home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / compiler / instruct.ml < prev    next >
Encoding:
Text File  |  1993-09-24  |  975 b   |  45 lines  |  [TEXT/MPS ]

  1. (* The type of the instructions of the abstract machine *)
  2.  
  3. #open "const";;
  4. #open "prim";;
  5.  
  6. type zam_instruction =
  7.     Kquote of struct_constant 
  8.   | Kget_global of qualified_ident
  9.   | Kset_global of qualified_ident
  10.   | Kaccess of int
  11.   | Kgrab
  12.   | Kpush
  13.   | Kpushmark
  14.   | Klet
  15.   | Kendlet of int
  16.   | Kapply
  17.   | Ktermapply
  18.   | Kcheck_signals
  19.   | Kreturn
  20.   | Kclosure of int
  21.   | Kletrec1 of int
  22.   | Kmakeblock of constr_tag * int 
  23.   | Kprim of primitive 
  24.   | Kpushtrap of int
  25.   | Kpoptrap
  26.   | Klabel of int
  27.   | Kbranch of int
  28.   | Kbranchif of int
  29.   | Kbranchifnot of int
  30.   | Kstrictbranchif of int
  31.   | Kstrictbranchifnot of int
  32.   | Ktest of bool_test * int
  33.   | Kbranchinterval of int * int * int * int
  34.   | Kswitch of int vect
  35. ;;
  36.  
  37. type zam_phrase =
  38.   { kph_rec: bool;                      (* is this a recursive let? *)
  39.     kph_init: zam_instruction list;     (* initialization code *)
  40.     kph_fcts: zam_instruction list }    (* code for functions *)
  41. ;;
  42.  
  43. let Nolabel = (-1)
  44. ;;
  45.