Closed
(* This module describes the "Closed ANF" intermediate language
* which is the output of MLPolyR's closure conversion. *)
datatype exp =
VALUES of value list
| BIND of lvar * value * exp
| CALL of Purity.purity * lvar list * jtarget * exp
| ARITH of Oper.arithop * value * value * lvar * exp
| RECORD of Purity.purity * value * slice list * lvar * exp
| SELECT of value * value * Purity.purity * lvar * exp
| UPDATE of value * value * value * exp
| CMP of Oper.cmpop * value * value * btarget * btarget
| JUMP of jtarget
and slice =
SGT of value
| SEQ of { base: value, start: value, stop: value }
withtype jtarget = value * value list
and btarget = label * value list
type block = label * lvar list * exp
type program = { calltargets: block list,
jumptargets: block list,
entrypoint: block }
type cluster = { entryblocks: block list, labelblocks: block list }