Commit | Line | Data |
---|---|---|
528693fd SK |
1 | type 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 | |
9 | and 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 | |
19 | and binop = | |
20 | | PLUS | MINUS | MUL | DIV | AND | OR | LSHIFT | RSHIFT | ARSHIFT | XOR | |
21 | and relop = | |
22 | | EQ | NE | LT | GT | LE | GE | |
23 | | ULT | ULE | UGT | UGE | |
24 | ||
25 | type t = exp |