public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
public void compileExpr(ASTree expr) throws CompileError { doTypeCheck(expr); expr.accept(this); }
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
public void compileExpr(ASTree expr) throws CompileError { doTypeCheck(expr); expr.accept(this); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); else throw new CompileError("bad case label"); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); throw new CompileError("bad case label"); }
public void atDeclarator(Declarator d) throws CompileError { d.setLocalVar(getMaxLocals()); d.setClassName(resolveClassName(d.getClassName())); int size; if (is2word(d.getType(), d.getArrayDim())) size = 2; else size = 1; incMaxLocals(size); /* NOTE: Array initializers has not been supported. */ ASTree init = d.getInitializer(); if (init != null) { doTypeCheck(init); atVariableAssign(null, '=', null, d, init, false); } }
@Override public void atDeclarator(Declarator d) throws CompileError { d.setLocalVar(getMaxLocals()); d.setClassName(resolveClassName(d.getClassName())); int size; if (is2word(d.getType(), d.getArrayDim())) size = 2; else size = 1; incMaxLocals(size); /* NOTE: Array initializers has not been supported. */ ASTree init = d.getInitializer(); if (init != null) { doTypeCheck(init); atVariableAssign(null, '=', null, d, init, false); } }
if (op == EXPR) { ASTree expr = st.getLeft(); doTypeCheck(expr); if (expr instanceof AssignExpr) atAssignExpr((AssignExpr)expr, false);
if (op == EXPR) { ASTree expr = st.getLeft(); doTypeCheck(expr); if (expr instanceof AssignExpr) atAssignExpr((AssignExpr)expr, false);
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError { doTypeCheck(expr); return booleanExpr(branchIf, expr); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); else throw new CompileError("bad case label"); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); else throw new CompileError("bad case label"); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); else throw new CompileError("bad case label"); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); else throw new CompileError("bad case label"); }
private int computeLabel(ASTree expr) throws CompileError { doTypeCheck(expr); expr = TypeChecker.stripPlusExpr(expr); if (expr instanceof IntConst) return (int)((IntConst)expr).get(); else throw new CompileError("bad case label"); }