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/runtime/kernel/boot.c
ViewVC logotype

Diff of /sml/trunk/src/runtime/kernel/boot.c

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

revision 770, Sun Dec 24 20:06:28 2000 UTC revision 771, Sat Dec 30 13:06:09 2000 UTC
# Line 95  Line 95 
95                  pid.bytes[i] = (HEX(c1) << 4) + HEX(c2);                  pid.bytes[i] = (HEX(c1) << 4) + HEX(c2);
96                }                }
97              }              }
98                if (!SilentLoad)
99              Say ("[Registering runtime system as %s]\n", fname+1);              Say ("[Registering runtime system as %s]\n", fname+1);
100              EnterPerID (msp, &pid, RunTimeCompUnit);              EnterPerID (msp, &pid, RunTimeCompUnit);
101              rts_init = 1;       /* make sure we do this only once */              rts_init = 1;       /* make sure we do this only once */
# Line 208  Line 209 
209   *          0 16  magic string   *          0 16  magic string
210   *         16  4  number of import values (importCnt)   *         16  4  number of import values (importCnt)
211   *         20  4  number of exports (exportCnt = currently always 0 or 1)   *         20  4  number of exports (exportCnt = currently always 0 or 1)
212   *         24  4  size of CM-specific info in bytes (cmInfoSzB)   *           24  4  size of import tree area in bytes (importSzB)
213   *         28  4  size of pickled lambda-expression in bytes (lambdaSzB)   *           28  4  size of CM-specific info in bytes (cmInfoSzB)
214   *         32  4  size of reserved area 1 in bytes (reserved1)   *           32  4  size of pickled lambda-expression in bytes (lambdaSzB)
215   *         36  4  size of reserved area 2 in bytes (reserved2)   *           36  4  size of reserved area in bytes (reserved)
216   *         40  4  size of code area in bytes (codeSzB)   *           40  4  size of padding area in bytes (pad)
217   *         44  4  size of pickled environment in bytes (envSzB)   *           44  4  size of code area in bytes (codeSzB)
218   *         48  i  import trees [This area contains pickled import trees --   *           48  4  size of pickled environment in bytes (envSzB)
219     *           52  i  import trees [This area contains pickled import trees --
220   *                  see below.  The total number of leaves in these trees is   *                  see below.  The total number of leaves in these trees is
221   *                  importCnt.  The size impSzB of this area depends on the   *                  importCnt.  The size impSzB of this area depends on the
222   *                  shape of the trees.]   *                  shape of the trees.]
223   *       i+48 ex  export pids [Each export pid occupies 16 bytes. Thus, the   *         i+52 ex  export pids [Each export pid occupies 16 bytes. Thus, the
224   *                  size ex of this area is 16*exportCnt (0 or 16).]   *                  size ex of this area is 16*exportCnt (0 or 16).]
225   *    ex+i+48 cm  CM info [Currently a list of pid-pairs.] (cm = cmInfoSzB)   *      ex+i+52 cm  CM info [Currently a list of pid-pairs.] (cm = cmInfoSzB)
226   * ----END OF HEADER----   * ----END OF HEADER----
227   *          0  h  HEADER (h = 48+cm+ex+i)   *            0  h  HEADER (h = 52+cm+ex+i)
228   *          h  l  pickle of exported lambda-expr. (l = lambdaSzB)   *          h  l  pickle of exported lambda-expr. (l = lambdaSzB)
229   *        l+h  r  reserved areas (r = reserved1+reserved2)   *          l+h  r  reserved area (r = reserved)
230   *      r+l+h  c  code area (c = codeSzB) [Structured into several   *        r+l+h  p  padding (p = pad)
231     *      p+r+l+h  c  code area (c = codeSzB) [Structured into several
232   *                  segments -- see below.]   *                  segments -- see below.]
233   *    c+r+l+h  e  pickle of static environment (e = envSzB)   *    c+p+r+l+h  e  pickle of static environment (e = envSzB)
234   *  e+c+r+l+h  -  END OF BINFILE   *  e+c+p+r+l+h  -  END OF BINFILE
235   *   *
236   * IMPORT TREE FORMAT description:   * IMPORT TREE FORMAT description:
237   *   *
# Line 385  Line 388 
388          *atptr = '\0';          *atptr = '\0';
389      }      }
390    
391        if (!SilentLoad)
392      Say ("[Loading %s]\n", objname);      Say ("[Loading %s]\n", objname);
393    
394    /* open the file */    /* open the file */
# Line 411  Line 415 
415      hdr.importSzB       = BIGENDIAN_TO_HOST(hdr.importSzB);      hdr.importSzB       = BIGENDIAN_TO_HOST(hdr.importSzB);
416      hdr.cmInfoSzB       = BIGENDIAN_TO_HOST(hdr.cmInfoSzB);      hdr.cmInfoSzB       = BIGENDIAN_TO_HOST(hdr.cmInfoSzB);
417      hdr.lambdaSzB       = BIGENDIAN_TO_HOST(hdr.lambdaSzB);      hdr.lambdaSzB       = BIGENDIAN_TO_HOST(hdr.lambdaSzB);
418      hdr.reserved1       = BIGENDIAN_TO_HOST(hdr.reserved1);      hdr.reserved        = BIGENDIAN_TO_HOST(hdr.reserved);
419      hdr.reserved2       = BIGENDIAN_TO_HOST(hdr.reserved2);      hdr.pad             = BIGENDIAN_TO_HOST(hdr.pad);
420      hdr.codeSzB         = BIGENDIAN_TO_HOST(hdr.codeSzB);      hdr.codeSzB         = BIGENDIAN_TO_HOST(hdr.codeSzB);
421      hdr.envSzB          = BIGENDIAN_TO_HOST(hdr.envSzB);      hdr.envSzB          = BIGENDIAN_TO_HOST(hdr.envSzB);
422    
# Line 452  Line 456 
456                          + exportSzB                          + exportSzB
457                          + hdr.cmInfoSzB                          + hdr.cmInfoSzB
458                          + hdr.lambdaSzB                          + hdr.lambdaSzB
459                          + hdr.reserved1 + hdr.reserved2;                          + hdr.reserved
460                            + hdr.pad;
461    
462          if (fseek(file, off, SEEK_SET) == -1)          if (fseek(file, off, SEEK_SET) == -1)
463              Die ("cannot seek on bin file \"%s\"", fname);              Die ("cannot seek on bin file \"%s\"", fname);

Legend:
Removed from v.770  
changed lines
  Added in v.771

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