return new Ex(new IRTree2.BINOP(IRTree2.BINOP.MUL, exp1, exp2));
}
public Exp visit(TExpArrayLookup n)
{
Temp t_index = new Temp();
Temp t_size = new Temp();
IRTree2.Exp e1 = n.e1.accept(this).unEx();
IRTree2.Exp e2 = n.e2.accept(this).unEx();
Label F = new Label();
Label T = new Label();
IRTree2.ExpList args1 = new ExpList(e2, null);
IRTree2.Stm s1 =
new IRTree2.SEQ
(new IRTree2.SEQ
(new IRTree2.SEQ
(new IRTree2.SEQ
(new IRTree2.SEQ
(new IRTree2.MOVE(new IRTree2.TEMP(t_index),new IRTree2.BINOP(IRTree2.BINOP.MUL,e2,new IRTree2.CONST(4))),
new IRTree2.MOVE(new IRTree2.TEMP(t_size),new IRTree2.MEM(e1))),
new IRTree2.CJUMP(IRTree2.CJUMP.GE,new IRTree2.TEMP(t_index),new IRTree2.TEMP(t_size),T,F)),
new IRTree2.LABEL(T)),
new IRTree2.MOVE(new IRTree2.TEMP(new Temp()),
new IRTree2.CALL(new IRTree2.NAME(new Label("_error")),args1))),
new IRTree2.LABEL(F));
Temp t = new Temp();
IRTree2.Stm s2 = new IRTree2.SEQ
(s1,new IRTree2.MOVE(new IRTree2.TEMP(t),new IRTree2.MEM
(new IRTree2.BINOP(IRTree2.BINOP.PLUS,e1,new IRTree2.BINOP
(IRTree2.BINOP.PLUS,
new IRTree2.BINOP(IRTree2.BINOP.MUL,e2,new IRTree2.CONST(4))