code.crt.put(TreeInfo.skipParens(tree.selector), CRT_FLOW_CONTROLLER, startpcCrt, code.curCP()); Env<GenContext> switchEnv = env.dup(tree, new GenContext()); switchEnv.info.isSwitch = true;
code.crt.put(TreeInfo.skipParens(tree.selector), CRT_FLOW_CONTROLLER, startpcCrt, code.curCP()); Env<GenContext> switchEnv = env.dup(tree, new GenContext()); switchEnv.info.isSwitch = true;
code.crt.put(TreeInfo.skipParens(tree.selector), CRT_FLOW_CONTROLLER, startpcCrt, code.curPc()); Env<GenContext> switchEnv = env.dup(tree, new GenContext()); switchEnv.info.isSwitch = true;
code.crt.put(TreeInfo.skipParens(tree.selector), CRT_FLOW_CONTROLLER, startpcCrt, code.curPc()); Env<GenContext> switchEnv = env.dup(tree, new GenContext()); switchEnv.info.isSwitch = true;
generateReferencesToPrunedTree(c, pool); Env<GenContext> localEnv = new Env<GenContext>(cdef, new GenContext()); localEnv.toplevel = env.toplevel; localEnv.enclClass = cdef;
List<JCExpressionStatement> step, boolean testFirst) { Env<GenContext> loopEnv = env.dup(loop, new GenContext()); int startpc = code.entryPoint(); if (testFirst) {
generateReferencesToPrunedTree(c, pool); Env<GenContext> localEnv = new Env<GenContext>(cdef, new GenContext()); localEnv.toplevel = env.toplevel; localEnv.enclClass = cdef;
pool.reset(); Env<GenContext> localEnv = new Env<GenContext>(cdef, new GenContext()); localEnv.toplevel = env.toplevel; localEnv.enclClass = cdef;
List<JCExpressionStatement> step, boolean testFirst) { Env<GenContext> loopEnv = env.dup(loop, new GenContext()); int startpc = code.entryPoint(); if (testFirst) { //while or for loop
pool.reset(); Env<GenContext> localEnv = new Env<GenContext>(cdef, new GenContext()); localEnv.toplevel = env.toplevel; localEnv.enclClass = cdef;
List<JCExpressionStatement> step, boolean testFirst) { Env<GenContext> loopEnv = env.dup(loop, new GenContext()); int startpc = code.entryPoint(); if (testFirst) {
List<JCExpressionStatement> step, boolean testFirst) { Env<GenContext> loopEnv = env.dup(loop, new GenContext()); int startpc = code.entryPoint(); if (testFirst) {
public void visitTry(final JCTry tree) { final Env<GenContext> tryEnv = env.dup(tree, new GenContext()); final Env<GenContext> oldEnv = env; if (!useJsrLocally) {
public void visitTry(final JCTry tree) { final Env<GenContext> tryEnv = env.dup(tree, new GenContext()); final Env<GenContext> oldEnv = env; if (!useJsrLocally) {
public void visitTry(final JCTry tree) { final Env<GenContext> tryEnv = env.dup(tree, new GenContext()); final Env<GenContext> oldEnv = env; if (!useJsrLocally) {
public void visitTry(final JCTry tree) { final Env<GenContext> tryEnv = env.dup(tree, new GenContext()); final Env<GenContext> oldEnv = env; if (!useJsrLocally) {
public void visitSynchronized(JCSynchronized tree) { int limit = code.nextreg; // Generate code to evaluate lock and save in temporary variable. final LocalItem lockVar = makeTemp(syms.objectType); genExpr(tree.lock, tree.lock.type).load().duplicate(); lockVar.store(); // Generate code to enter monitor. code.emitop0(monitorenter); code.state.lock(lockVar.reg); // Generate code for a try statement with given body, no catch clauses // in a new environment with the "exit-monitor" operation as finalizer. final Env<GenContext> syncEnv = env.dup(tree, new GenContext()); syncEnv.info.finalize = new GenFinalizer() { void gen() { genLast(); assert syncEnv.info.gaps.length() % 2 == 0; syncEnv.info.gaps.append(code.curPc()); } void genLast() { if (code.isAlive()) { lockVar.load(); code.emitop0(monitorexit); code.state.unlock(lockVar.reg); } } }; syncEnv.info.gaps = new ListBuffer<Integer>(); genTry(tree.body, List.<JCCatch>nil(), syncEnv); code.endScopes(limit); }
public void visitSynchronized(JCSynchronized tree) { int limit = code.nextreg; // Generate code to evaluate lock and save in temporary variable. final LocalItem lockVar = makeTemp(syms.objectType); genExpr(tree.lock, tree.lock.type).load().duplicate(); lockVar.store(); // Generate code to enter monitor. code.emitop0(monitorenter); code.state.lock(lockVar.reg); // Generate code for a try statement with given body, no catch clauses // in a new environment with the "exit-monitor" operation as finalizer. final Env<GenContext> syncEnv = env.dup(tree, new GenContext()); syncEnv.info.finalize = new GenFinalizer() { void gen() { genLast(); assert syncEnv.info.gaps.length() % 2 == 0; syncEnv.info.gaps.append(code.curPc()); } void genLast() { if (code.isAlive()) { lockVar.load(); code.emitop0(monitorexit); code.state.unlock(lockVar.reg); } } }; syncEnv.info.gaps = new ListBuffer<Integer>(); genTry(tree.body, List.<JCCatch>nil(), syncEnv); code.endScopes(limit); }
public void visitSynchronized(JCSynchronized tree) { int limit = code.nextreg; // Generate code to evaluate lock and save in temporary variable. final LocalItem lockVar = makeTemp(syms.objectType); genExpr(tree.lock, tree.lock.type).load().duplicate(); lockVar.store(); // Generate code to enter monitor. code.emitop0(monitorenter); code.state.lock(lockVar.reg); // Generate code for a try statement with given body, no catch clauses // in a new environment with the "exit-monitor" operation as finalizer. final Env<GenContext> syncEnv = env.dup(tree, new GenContext()); syncEnv.info.finalize = new GenFinalizer() { void gen() { genLast(); Assert.check(syncEnv.info.gaps.length() % 2 == 0); syncEnv.info.gaps.append(code.curCP()); } void genLast() { if (code.isAlive()) { lockVar.load(); code.emitop0(monitorexit); code.state.unlock(lockVar.reg); } } }; syncEnv.info.gaps = new ListBuffer<Integer>(); genTry(tree.body, List.<JCCatch>nil(), syncEnv); code.endScopes(limit); }
public void visitSynchronized(JCSynchronized tree) { int limit = code.nextreg; // Generate code to evaluate lock and save in temporary variable. final LocalItem lockVar = makeTemp(syms.objectType); genExpr(tree.lock, tree.lock.type).load().duplicate(); lockVar.store(); // Generate code to enter monitor. code.emitop0(monitorenter); code.state.lock(lockVar.reg); // Generate code for a try statement with given body, no catch clauses // in a new environment with the "exit-monitor" operation as finalizer. final Env<GenContext> syncEnv = env.dup(tree, new GenContext()); syncEnv.info.finalize = new GenFinalizer() { void gen() { genLast(); Assert.check(syncEnv.info.gaps.length() % 2 == 0); syncEnv.info.gaps.append(code.curCP()); } void genLast() { if (code.isAlive()) { lockVar.load(); code.emitop0(monitorexit); code.state.unlock(lockVar.reg); } } }; syncEnv.info.gaps = new ListBuffer<Integer>(); genTry(tree.body, List.<JCCatch>nil(), syncEnv); code.endScopes(limit); }