< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java

Print this page
rev 51258 : imported patch switch.diff

*** 181,190 **** --- 181,192 ---- */ final Pool pool; final MethodSymbol meth; + private int letExprStackPos = 0; + /** Construct a code object, given the settings of the fatcode, * debugging info switches and the CharacterRangeTable. */ public Code(MethodSymbol meth, boolean fatcode,
*** 380,390 **** emit1(op); } } void postop() { ! Assert.check(alive || state.stacksize == 0); } /** Emit a ldc (or ldc_w) instruction, taking into account operand size */ public void emitLdc(int od) { --- 382,392 ---- emit1(op); } } void postop() { ! Assert.check(alive || isStatementStart()); } /** Emit a ldc (or ldc_w) instruction, taking into account operand size */ public void emitLdc(int od) {
*** 1209,1218 **** --- 1211,1229 ---- if (debugCode) System.err.println("entry point " + state); pendingStackMap = needStackMap; return pc; } + public int setLetExprStackPos(int pos) { + int res = letExprStackPos; + letExprStackPos = pos; + return res; + } + + public boolean isStatementStart() { + return state.stacksize == letExprStackPos; + } /************************************************************************** * Stack map generation *************************************************************************/
*** 1472,1482 **** public void resolve(Chain chain, int target) { boolean changed = false; State newState = state; for (; chain != null; chain = chain.next) { Assert.check(state != chain.state ! && (target > chain.pc || state.stacksize == 0)); if (target >= cp) { target = cp; } else if (get1(target) == goto_) { if (fatcode) target = target + get4(target + 1); else target = target + get2(target + 1); --- 1483,1493 ---- public void resolve(Chain chain, int target) { boolean changed = false; State newState = state; for (; chain != null; chain = chain.next) { Assert.check(state != chain.state ! && (target > chain.pc || isStatementStart())); if (target >= cp) { target = cp; } else if (get1(target) == goto_) { if (fatcode) target = target + get4(target + 1); else target = target + get2(target + 1);
< prev index next >