/** Duplicate this environment, updating with given tree, * and copying all other fields. */ public Env<A> dup(JCTree tree) { return dup(tree, this.info); }
/** Duplicate this environment, updating with given tree, * and copying all other fields. */ public Env<A> dup(JCTree tree) { return dup(tree, this.info); }
/** Duplicate this environment, updating with given tree, * and copying all other fields. */ public Env<A> dup(JCTree tree) { return dup(tree, this.info); }
public void visitExec(JCExpressionStatement tree) { //a fresh environment is required for 292 inference to work properly --- //see Infer.instantiatePolymorphicSignatureInstance() Env<AttrContext> localEnv = env.dup(tree); attribExpr(tree.expr, localEnv); result = null; }
public Type attribType(JCTree node, TypeSymbol sym) { Env<AttrContext> env = enter.typeEnvs.get(sym); Env<AttrContext> localEnv = env.dup(node, env.info.dup()); return attribTree(node, localEnv, Kinds.TYP, Type.noType); }
public void visitDoLoop(JCDoWhileLoop tree) { attribStat(tree.body, env.dup(tree)); attribExpr(tree.cond, env, syms.booleanType); result = null; }
public void visitWhileLoop(JCWhileLoop tree) { attribExpr(tree.cond, env, syms.booleanType); attribStat(tree.body, env.dup(tree)); result = null; }
public void visitWhileLoop(JCWhileLoop tree) { attribExpr(tree.cond, env, syms.booleanType); attribStat(tree.body, env.dup(tree)); result = null; }
public void visitWhileLoop(JCWhileLoop tree) { attribExpr(tree.cond, env, syms.booleanType); attribStat(tree.body, env.dup(tree)); result = null; }
public void visitWhileLoop(JCWhileLoop tree) { attribExpr(tree.cond, env, syms.booleanType); attribStat(tree.body, env.dup(tree)); result = null; }
public void visitLabelled(JCLabeledStatement tree) { Env<GenContext> localEnv = env.dup(tree, new GenContext()); genStat(tree.body, localEnv, CRT_STATEMENT); code.resolve(localEnv.info.exit); }
public void visitLabelled(JCLabeledStatement tree) { Env<GenContext> localEnv = env.dup(tree, new GenContext()); genStat(tree.body, localEnv, CRT_STATEMENT); code.resolve(localEnv.info.exit); }
Env<AttrContext> copyEnv(Env<AttrContext> env) { Env<AttrContext> newEnv = env.dup(env.tree, env.info.dup(copyScope(env.info.scope))); if (newEnv.outer != null) { newEnv.outer = copyEnv(newEnv.outer); } return newEnv; }
public void visitLabelled(JCLabeledStatement tree) { Env<GenContext> localEnv = env.dup(tree, new GenContext()); genStat(tree.body, localEnv, CRT_STATEMENT); code.resolve(localEnv.info.exit); }
public void visitAssign(JCAssign tree) { Type owntype = attribTree(tree.lhs, env.dup(tree), varInfo); Type capturedType = capture(owntype); attribExpr(tree.rhs, env, owntype); result = check(tree, capturedType, VAL, resultInfo); }
public void visitAssign(JCAssign tree) { Type owntype = attribTree(tree.lhs, env.dup(tree), VAR, Type.noType); Type capturedType = capture(owntype); attribExpr(tree.rhs, env, owntype); result = check(tree, capturedType, VAL, pkind, pt); }
public void visitBlock(JCBlock tree) { int limit = code.nextreg; Env<GenContext> localEnv = env.dup(tree, new GenContext()); genStats(tree.stats, localEnv); // End the scope of all block-local variables in variable info. if (!env.tree.hasTag(METHODDEF)) { code.statBegin(tree.endpos); code.endScopes(limit); code.pendingStatPos = Position.NOPOS; } }
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where