Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/branches/primop-branch/src/compiler/Execution/binfile/binfile.sig
ViewVC logotype

Annotation of /sml/branches/primop-branch/src/compiler/Execution/binfile/binfile.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1471 - (view) (download) (as text)

1 : blume 902 (* binfile-new.sig
2 :     *
3 :     * (C) 2001 Lucent Technologies, Bell Labs
4 :     *
5 :     * author: Matthias Blume (blume@research.bell-labs.com
6 :     *)
7 :     (*
8 :     * This revised version of signature BINFILE is now machine-independent.
9 :     * Moreover, it deals with the file format only and does not know how to
10 :     * create new binfile contents (aka "compile") or how to interpret the
11 :     * pickles. As a result, it does not statically depend on the compiler.
12 :     * (Eventually we might want to support a light-weight binfile loader.)
13 :     *)
14 :     signature BINFILE = sig
15 :    
16 :     type bfContents
17 :    
18 :     exception FormatError
19 :    
20 :     type pid = PersStamps.persstamp
21 :     type stats = { env: int, inlinfo: int, data: int, code: int }
22 :     type pickle = { pid: pid, pickle: Word8Vector.vector }
23 :    
24 :     val staticPidOf : bfContents -> pid
25 :     val exportPidOf : bfContents -> pid option
26 :     val lambdaPidOf : bfContents -> pid
27 :     val cmDataOf : bfContents -> pid list
28 :    
29 :     val senvPickleOf : bfContents -> pickle
30 :     val lambdaPickleOf : bfContents -> pickle
31 :    
32 : blume 1137 val guidOf : bfContents -> string
33 : blume 1058
34 : blume 902 (* calculate the size in bytes occupied by some binfile contents *)
35 :     val size : { contents: bfContents, nopickle: bool } -> int
36 :    
37 :     (* create the abstract binfile contents *)
38 :     val create : { imports: ImportTree.import list,
39 :     exportPid: pid option,
40 :     cmData: pid list,
41 :     senv: pickle,
42 :     lambda: pickle,
43 : blume 1137 guid: string,
44 : blume 902 csegments: CodeObj.csegments } -> bfContents
45 :    
46 : blume 1137 (* read just the guid *)
47 :     val readGUid : BinIO.instream -> string
48 : blume 1058
49 : blume 902 (* read binfile contents from an IO stream *)
50 : blume 986 val read : { arch: string, version: int list, stream: BinIO.instream }
51 : blume 902 -> { contents: bfContents, stats: stats }
52 :    
53 :     (* write binfile contents to an IO stream *)
54 :     val write : { arch: string, version: int list,
55 :     stream: BinIO.outstream,
56 :     contents: bfContents, nopickle: bool }
57 :     -> stats
58 :    
59 :     (* Given a dynamic environment, link the code object contained in
60 :     * some given binfile contents. The result is the delta environment
61 :     * containing the bindings (if any) resulting from this link operation. *)
62 : macqueen 1471 val exec : bfContents * DynamicEnv.env * (exn -> exn) -> DynamicEnv.env
63 : blume 902 end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0