## frozenlib-tome.api
#
# A .compiled file (foo.api.compiled or foo.pkg.compiled) contains
# the result of compiling one source file -- foo.api or foo.pkg.
#
# It contains mainly executable code and a
# pickled version of the exported symbol table -- see
#
#
src/lib/compiler/execution/compiledfile/compiledfile.pkg#
# A frozenlib_tome record contains a summary of an
# compiledfile for use in dependency graphs and their analysis.
#
# In essence, it records what freezefile the compiledfile is
# packed inside, and at what offset.
#
# We only construct such records for compiled_files
# which are packed inside a freezefile -- otherwise
# we use the
#
# Thawedlib_Tome
#
# records defined in
#
#
src/app/makelib/compilable/thawedlib-tome.pkg#
# (See the comments there for additional discussion.)
#
# A frozenlib_tome record includes only information
# that does not require running the machine-dependent
# part of the compiler.
# Compiled by:
#
src/app/makelib/makelib.sublib### "My pen is my harp and my lyre;
### my library is my garden and my orchard."
###
### -- Judah Halevi
# This api is implemented in:
#
src/app/makelib/freezefile/frozenlib-tome.pkgstipulate
package ad = anchor_dictionary; # anchor_dictionary is from
src/app/makelib/paths/anchor-dictionary.pkg package err = error_message; # error_message is from
src/lib/compiler/front/basics/errormsg/error-message.pkg package lnd = line_number_db; # line_number_db is from
src/lib/compiler/front/basics/source/line-number-db.pkg package shm = sharing_mode; # sharing_mode is from
src/app/makelib/stuff/sharing-mode.pkg package ph = picklehash; # picklehash is from
src/lib/compiler/front/basics/map/picklehash.pkgherein
api Frozenlib_Tome {
#
Frozenlib_Tome =
{
api_or_pkg_file_path: String, # Sourcefile pathname verbatim from .lib-file, e.g. "foo.api" or "foo.pkg" or "fancy/graphviz/text/text-display.api" or "../emit/asm-emit.pkg".
libfile: ad::File, # .lib file defining the library containing us.
freezefile_name: String, # Name of binary freezefile proper -- "foo.lib.frozen".
#
byte_offset_in_freezefile: Int, # Our byte offset within the containing freezefile.
sharing_mode: shm::Mode, # Normally SHARE(FALSE).
plaint_sink: err::Plaint_Sink, # Where to send link error diagnostics etc.
#
runtime_package_picklehash: Null_Or( ph::Picklehash ) # NULL except for runtime.pkg.compiled.
# This is a special kludge supporting Mythryl-level access
# to C-coded runtime -- see code and comments in:
#
#
src/lib/core/init/runtime.pkg # src/c/main/construct-runtime-package.c
# src/c/main/load-compiledfiles.c
#
src/app/makelib/mythryl-compiler-compiler/find-set-of-compiledfiles-for-executable.pkg };
Key = Frozenlib_Tome;
compare: (Frozenlib_Tome, Frozenlib_Tome) -> Order;
describe_frozenlib_tome: Frozenlib_Tome -> String; # (sprintf "%s@%d(%s)" libfile byteoffset_in_lib sourcefile) -- something like "$ROOT/src/lib/x-kit/xkit.lib@243309(src/color/rgb.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.