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

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/Execution/binfile/binfile.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/Execution/binfile/binfile.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1044, Mon Jan 28 21:36:08 2002 UTC revision 1045, Mon Jan 28 22:13:13 2002 UTC
# Line 56  Line 56 
56   *  length of l) followed by n (int * node) subcomponents.  Each component   *  length of l) followed by n (int * node) subcomponents.  Each component
57   *  consists of the integer selector followed by the corresponding tree.   *  consists of the integer selector followed by the corresponding tree.
58   *   *
  *  The size of the import tree area is only given implicitly. When reading  
  *  this area, the reader must count the number of leaves and compare it  
  *  with importCnt.  
  *  
59   *  Integer values in the import tree area (lengths and selectors) are   *  Integer values in the import tree area (lengths and selectors) are
60   *  written in "packed" integer format. In particular, this means that   *  written in "packed" integer format. In particular, this means that
61   *  Values in the range 0..127 are represented by only 1 byte.   *  Values in the range 0..127 are represented by only 1 byte.
# Line 85  Line 81 
81   *  two.  The very first segment is the "data" segment -- responsible for   *  two.  The very first segment is the "data" segment -- responsible for
82   *  creating literal constants on the heap.  The idea is that code in the   *  creating literal constants on the heap.  The idea is that code in the
83   *  data segment will be executed only once at link-time. Thus, it can   *  data segment will be executed only once at link-time. Thus, it can
84   *  then be garbage-collected immediatly. (In the future it is possible that   *  then be garbage-collected immediatly. (In fact, the data segment does
85   *  the data segment will not contain executable code at all but some form   *  not consist of machine code but of code for an internal bytecode engine.)
  *  of bytecode that is to be interpreted separately.)  
86   *   *
87   *  In the binfile, each code segment is represented by its size s (in   *  In the binfile, each code segment is represented by its size s (in
88   *  bytes -- written as a 4-byte big-endian integer) followed by s bytes of   *  bytes -- written as a 4-byte big-endian integer) followed by s bytes of
# Line 98  Line 93 
93   *   *
94   *  Linking is achieved by executing all code segments in sequential order.   *  Linking is achieved by executing all code segments in sequential order.
95   *   *
96   *  The first code segment (i.e., the "data" segment) receives unit as   *  Conceptually, the first code segment (i.e., the "data" segment) receives
97   *  its single argument.   *  unit as its single argument. (In reality this code segment consists of
98     *  bytecode which does not really receive any arguments.)
99   *   *
100   *  The second code segment receives a record as its single argument.   *  The second code segment receives a record as its single argument.
101   *  This record has (importCnt+1) components.  The first importCnt   *  This record has (importCnt+1) components.  The first importCnt

Legend:
Removed from v.1044  
changed lines
  Added in v.1045

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