Define the tree IR
[tiger.ml.git] / compiler / src / lib / tiger / tiger_tree.ml
CommitLineData
528693fd
SK
1type exp =
2 | CONST of int
3 | NAME of Tiger_temp.Label.t
4 | TEMP of Tiger_temp.Temp.t
5 | BINOP of binop * exp * exp
6 | MEM of exp
7 | CALL of exp * exp list
8 | ESEQ of stm * exp
9and stm =
10 | MOVE of exp * exp
11 | EXP of exp
12 | JUMP of exp * Tiger_temp.Label.t list
13 (* List is for possible locations that exp can evaluate to, which will be
14 * needed for dataflow analysis, but for now, the common case will be
15 * JUMP(NAME, l, [l]) *)
16 | CJUMP of relop * exp * exp * Tiger_temp.Label.t * Tiger_temp.Label.t
17 | SEQ of stm * stm
18 | LABEL of Tiger_temp.Label.t
19and binop =
20 | PLUS | MINUS | MUL | DIV | AND | OR | LSHIFT | RSHIFT | ARSHIFT | XOR
21and relop =
22 | EQ | NE | LT | GT | LE | GE
23 | ULT | ULE | UGT | UGE
24
25type t = exp
This page took 0.017073 seconds and 4 git commands to generate.