home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / sml_nj / 93src.lha / src / basics / primop.sig < prev    next >
Encoding:
Text File  |  1993-01-27  |  2.7 KB  |  63 lines

  1. (* Copyright 1989 by AT&T Bell Laboratories *)
  2. (* primop.sig *)
  3.  
  4. signature PRIMOP =
  5.   sig
  6.  
  7.   (* Various primitive operations.  Those that are designated "inline" are
  8.    * expanded into lambda representation in the InlineOps structure.
  9.    *)
  10.     datatype primop
  11.       = IADD | ISUB | IMUL | IDIV | INEG    (* integer arithmetic *)
  12.       | IGE | IGT | ILE | ILT            (* integer comparisons *)
  13.       | LESSU | GEQU                (* unsigned comparisons *)
  14.       | IEQL | INEQ                (* integer (and pointer) equality *)
  15.       | FADDd | FSUBd | FMULd | FDIVd | FNEGd    (* double precision arithmetic *)
  16.       | FABSd                    (* double precision abs *)
  17.       | FGEd | FGTd | FLEd | FLTd        (* double precision comparisons *)
  18.       | FEQLd | FNEQd                (* double precision equality *)
  19.       | POLYEQL | POLYNEQ            (* polymorphic equality *)
  20.       | BOXED | UNBOXED                (* boxity tests *)
  21.       | LENGTH                    (* vector, string, array, ... length *)
  22.       | OBJLENGTH                (* length of arbitrary heap object *)
  23.       | CAST
  24.       | GETHDLR | SETHDLR            (* get/set exn handler pointer *)
  25.       | GETVAR | SETVAR                (* get/set var register *)
  26.       | MAKEREF                    (* allocate a ref cell *)
  27.       | CALLCC | CAPTURE | THROW        (* continuation operations *)
  28.       | STORE                    (* bytearray update *)
  29.       | INLSTORE                (* inline bytearray update *)
  30.       | ORDOF                    (* string subscript *)
  31.       | INLORDOF                (* inline string subscript *)
  32.       | INLBYTEOF                (* inline bytearray subscript *)
  33.       | DEREF                    (* dereferencing *)
  34.       | ASSIGN                    (* assignment; this is short for *)
  35.                         (* an update operation *)
  36.       | UPDATE                    (* array update (maybe boxed) *)
  37.       | INLUPDATE                (* inline array update (maybe boxed) *)
  38.       | BOXEDUPDATE                (* boxed array update *)
  39.       | UNBOXEDUPDATE                (* unboxed array update *)
  40.       | SUBSCRIPT                (* array subscript *)
  41.       | INLSUBSCRIPT                (* inline array subscript *)
  42.       | FLOOR                    (* double precision -> int conversion *)
  43.       | ROUND                    (* UNIMPLEMENTED *)
  44.       | REAL                    (* int -> double precision conversion *)
  45.       | SUBSCRIPTV                (* vector subscript *)
  46.       | INLSUBSCRIPTV                (* inline vector subscript *)
  47.       | FSUBSCRIPTd                (* real array subscript *)
  48.       | INLFSUBSCRIPTd                (* inline real array subscript *)
  49.       | FUPDATEd                (* real array update *)
  50.       | INLFUPDATEd                (* inline real array update *)
  51.       | RSHIFT | LSHIFT                (* logical shifts *)
  52.       | ORB | ANDB | XORB | NOTB        (* bit-wise logical operations *)
  53.       | GETTAG                    (* extract the tag portion of an *)
  54.                         (* object's descriptor as an ML int *)
  55.       | MKSPECIAL                (* make a special object *)
  56.       | SETSPECIAL                (* set the state of a special object *)
  57.       | GETSPECIAL                (* get the state of a special object *)
  58.       | USELVAR | DEFLVAR
  59.  
  60.     val pr_primop: primop -> string
  61.  
  62.   end (* PRIMOP *)
  63.