## compile-in-dependency-order.api -- makelib dependency graph dagwalks.
# Compiled by:
#
src/app/makelib/makelib.sublibstipulate
package ad = anchor_dictionary; # anchor_dictionary is from
src/app/makelib/paths/anchor-dictionary.pkg package cf = compiledfile; # compiledfile is from
src/lib/compiler/execution/compiledfile/compiledfile.pkg package err = error_message; # error_message is from
src/lib/compiler/front/basics/errormsg/error-message.pkg package im = inlining_mapstack; # inlining_mapstack is from
src/lib/compiler/toplevel/compiler-state/inlining-mapstack.pkg package lg = inter_library_dependency_graph; # inter_library_dependency_graph is from
src/app/makelib/depend/inter-library-dependency-graph.pkg package ms = makelib_state; # makelib_state is from
src/app/makelib/main/makelib-state.pkg package ph = picklehash; # picklehash is from
src/lib/compiler/front/basics/map/picklehash.pkg package pp = standard_prettyprinter; # standard_prettyprinter is from
src/lib/prettyprint/big/src/standard-prettyprinter.pkg package pu = unparse_junk; # unparse_junk is from
src/lib/compiler/front/typer/print/unparse-junk.pkg package sg = intra_library_dependency_graph; # intra_library_dependency_graph is from
src/app/makelib/depend/intra-library-dependency-graph.pkg package sym = symbol_map; # symbol_map is from
src/app/makelib/stuff/symbol-map.pkg package syx = symbolmapstack; # symbolmapstack is from
src/lib/compiler/front/typer-stuff/symbolmapstack/symbolmapstack.pkg package tlt = thawedlib_tome; # thawedlib_tome is from
src/app/makelib/compilable/thawedlib-tome.pkg # Per package table of exported symbols (functions, types...)
# and of exported inlinable functions:
#
Symbol_And_Inlining_Mapstacks
=
{ symbolmapstack: syx::Symbolmapstack,
inlining_mapstack: im::Picklehash_To_Anormcode_Mapstack
};
herein
api Compile_In_Dependency_Order {
#
#
clear_state: Void -> Void; # Clear all internal persistent state.
# Support for hook which notifies
# linkage module of recompilations.
# The linker needs to know about these so it
# can flush stale information from its caches:
#
# "You can observe a lot just by watching." -- Yogi Berra
#
Thawedlib_Tome_Watcher
=
ms::Makelib_State # Master makelib state record.
->
tlt::Thawedlib_Tome # What is being recompiled.
->
Void; # Send the notification.
Compiledfile_Sink # Type of a function which stores away compiledfile contents:
=
{ key: tlt::Thawedlib_Tome,
#
value: { compiledfile: cf::Compiledfile,
component_bytesizes: cf::Component_Bytesizes
}
}
->
Void;
get_symbol_and_inlining_mapstacks: tlt::Thawedlib_Tome -> sg::Tome_Compile_Result;
drop_stale_entries_from_compiler_map: Void -> Void;
drop_all_entries_from_compiler_map: Void -> Void;
compile_tome_tin_after_dependencies
:
Void
->
ms::Makelib_State # Master makelib state record.
->
sg::Tome_Tin # Root node of graph to traverse.
->
Null_Or( sg::Tome_Compile_Result );
make_dependency_order_compile_fns
:
{ root_library # Root library for compile; compile this plus all of its sublibraries + recursively all external libraries needed.
:
lg::Inter_Library_Dependency_Graph,
#
maybe_drop_thawedlib_tome_from_linker_map # Notify linker of recompiles. Normally a dummy
: # or drop_thawedlib_tome_from_linker_map() from
src/app/makelib/compile/link-in-dependency-order-g.pkg Thawedlib_Tome_Watcher,
#
set__compiledfile__for__thawedlib_tome
:
Compiledfile_Sink #
}
->
{ compile_library_catalog_in_dependency_order
:
ms::Makelib_State -> Null_Or( Symbol_And_Inlining_Mapstacks ),
compile_all_fat_tomes_in_library_in_dependency_order # Called by freeze' in
src/app/makelib/main/makelib-g.pkg : # and by freeze in
src/app/makelib/mythryl-compiler-compiler/mythryl-compiler-compiler-g.pkg ms::Makelib_State -> Bool, # Returns TRUE iff all .api and .pkg files compiled successfully.
per_fat_tome_fns_to_compile_after_dependencies # For each far tome in library, a fn that will compile it after compiling its dependencies.
: # This is (only) used to look up and compile the pervasive-package symbol "<Pervasive>"
sym::Map (ms::Makelib_State -> Null_Or( Symbol_And_Inlining_Mapstacks ) ) # during bootstrap stuff in
src/app/makelib/main/makelib-g.pkg };
};
end;
## (C) 1999 Lucent Technologies, Bell Laboratories
## Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.