home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / compiler / Code_dec.sml < prev    next >
Encoding:
Text File  |  1997-08-18  |  998 b   |  33 lines  |  [TEXT/R*ch]

  1. local
  2.   open Mixture Const;
  3. in
  4.  
  5. (* Relocation information *)
  6.  
  7. datatype reloc_info =
  8.     Reloc_literal of StructConstant            (* structured constant *)
  9.   | Reloc_getglobal of (QualifiedIdent * int)  (* reference to a global *)
  10.   | Reloc_setglobal of (QualifiedIdent * int)  (* definition of a global *)
  11.   | Reloc_tag of QualifiedIdent * int          (* exception tag *)
  12.   | Reloc_primitive of string                  (* C primitive number *)
  13. ;
  14.  
  15. type compiled_phrase =
  16. {
  17.   cph_pos: int,                        (* Position of start of code *)
  18.   cph_len: int,                        (* Length of code *)
  19.   cph_reloc: (reloc_info * int) list,  (* What to patch *)
  20.   cph_pure: bool                       (* Can be omitted or not *)
  21. };
  22.  
  23. type compiled_unit_tables =
  24. {
  25.   cu_phrase_index: compiled_phrase list,
  26.   cu_exc_ren_list: (QualifiedIdent * (QualifiedIdent * int)) list,
  27.   cu_val_ren_list: (string * int) list,
  28.   cu_sig_stamp:    SigStamp,
  29.   cu_mentions:     (string, SigStamp) Hasht.t
  30. };
  31.  
  32. end;
  33.