PreviousUpNext

15.4.533  src/lib/compiler/execution/linking-mapstack/linking-mapstack.pkg

## linking-mapstack.pkg

# Compiled by:
#     src/lib/compiler/execution/execute.sublib


# The linking table is maintained and used by
# the linker, and records the linkage-level information
# of interest to it, primarily information about the
# linkable values exported by compiled source files
# -- "compiled_files".
#
# The linking dictionary contains one entry per compiledfile.
#
# Each entry's key is the 16-byte exports Picklehash
# of that compiledfile.
#
# Each entry's value is a record indexed by selectors,
# listing the stuff exported by that compiledfile.
#
# Since each record entry may in itself be
# a record, in general we access stuff in the
# linking dictionary by first looking up some
# export pick_hash identifying the desired compiledfile,
# then doing successive selections down some path
# of record selectors until we arrive at the
# actual desired datum.


# Compare to:
#     src/lib/compiler/toplevel/compiler-state/inlining-mapstack.pkg

stipulate
    package un  =  unsafe;                                                              # unsafe                        is from   src/lib/std/src/unsafe/unsafe.pkg
herein

    package   linking_mapstack
    : (weak)  Linking_Mapstack                                                          # Linking_Mapstack              is from   src/lib/compiler/execution/linking-mapstack/linking-mapstack.api
    {
        package foo = picklehash_mapstack_g (                                           # picklehash_mapstack_g         is from   src/lib/compiler/front/basics/map/picklehash-mapstack-g.pkg
                          #
                          Values_Type = un::unsafe_chunk::Chunk;
                      );

        include package   foo;                                                          # Cannot yet write   include package   picklehash_mapstack_g (Values_Type = unsafe::unsafe_chunk::Chunk;);      XXX BUGGO FIXME

        Picklehash_To_Heapchunk_Mapstack =  Picklehash_Mapstack;                        # Type synonym for improved readability.
    };
end;


## (C) 2001 Lucent Technologies, Bell Labs
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext