## unpickler-junk.api
#
# The new unpickler (based on the new generic unpickling facility).
#
# The unpickler embeds a "Modtree" into the unpickled dictionary.
# The Modtree allows for very rapid construction of modmaps so that
# modmaps do not have to be stored permanently but can be built on-demand.
# (Permanently stored modmaps incur space problems: one has to be careful
# that they don't hang on to namings that no longer exist, and because
# of sharing there can be significant overlap--and space overhead--in what
# each such map points to. Modtrees do not have these problems.)
#
# The embedding of modtrees into symbol tables follows the example
# of the control-flow in the original "cmstatenv.sml" module. This means
# that not all possible branches of the dictionary data package are
# explored when building modmaps. I dearly hope that the original code
# was correct in its assumptions...
#
# March 2000, Matthias Blume
# Compiled by:
#
src/lib/compiler/core.sublibstipulate
package acf = anormcode_form; # anormcode_form is from
src/lib/compiler/back/top/anormcode/anormcode-form.pkg package cty = ctypes; # ctypes is from
src/lib/compiler/back/low/ccalls/ctypes.pkg package im = inlining_mapstack; # inlining_mapstack is from
src/lib/compiler/toplevel/compiler-state/inlining-mapstack.pkg package ph = picklehash; # picklehash is from
src/lib/compiler/front/basics/map/picklehash.pkg package sta = stamp; # stamp is from
src/lib/compiler/front/typer-stuff/basics/stamp.pkg package stx = stampmapstack; # stampmapstack is from
src/lib/compiler/front/typer-stuff/modules/stampmapstack.pkg package syx = symbolmapstack; # symbolmapstack is from
src/lib/compiler/front/typer-stuff/symbolmapstack/symbolmapstack.pkg package sy = symbol; # symbol is from
src/lib/compiler/front/basics/map/symbol.pkg package upr = unpickler; # unpickler is from
src/lib/compiler/src/library/unpickler.pkgherein
# This api is implemented in:
#
#
src/lib/compiler/front/semantic/pickle/unpickler-junk.pkg #
api Unpickler_Junk {
#
Unpickling_Context
=
Null_Or( (Int, sy::Symbol) ) -> stx::Stampmapstack;
unpickle_symbolmapstack
:
Unpickling_Context
->
( ph::Picklehash,
vector_of_one_byte_unts::Vector
)
->
syx::Symbolmapstack;
unpickle_highcode
:
vector_of_one_byte_unts::Vector
->
Null_Or( acf::Function );
# 'make_unpicklers' is intended to be used by Makelib's
# library-freezing mechanism --
src/app/makelib/freezefile/freezefile-g.pkg #
# The symbol table unpickler resulting from "make_unpicklers"
# cannot be used for "original" symbol tables that come out of
# the typechecker. For those, continue to use "unpickle_symbolmapstack".
make_unpicklers
:
{ unpickler: upr::Unpickler,
read_list_of_strings: upr::Pickle_Reader( List(String) )
}
->
Unpickling_Context
->
{ read_inlining_mapstack: upr::Pickle_Reader( im::Picklehash_To_Anormcode_Mapstack ),
read_symbolmapstack: upr::Pickle_Reader( syx::Symbolmapstack ),
read_symbol: upr::Pickle_Reader( sy::Symbol ),
read_list_of_symbols: upr::Pickle_Reader( List( sy::Symbol ) )
};
};
end;