return target;
}
public int translate(int level, Expr.BinOp code, Environment environment,
SpecFile file) {
Type type = code.attribute(Attribute.Type.class).type;
Type lhs_t = code.lhs.attribute(Attribute.Type.class).type;
Type rhs_t = code.rhs.attribute(Attribute.Type.class).type;
int lhs = translate(level, code.lhs, environment, file);
String body;
if (code.op == Expr.BOp.IS && code.rhs instanceof Expr.Constant) {
// special case for runtime type tests
Expr.Constant c = (Expr.Constant) code.rhs;
Type test = (Type) c.value;
int typeIndex = register(test);
body = "Runtime.accepts(type" + typeIndex + ", automaton, r" + lhs
+ ", SCHEMA)";
} else if (code.op == Expr.BOp.AND) {
// special case to ensure short-circuiting of AND.