protected void consumeStatementSynchronized() { // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block //optimize the push/pop if (this.astLengthStack[this.astLengthPtr] == 0) { this.astLengthStack[this.astLengthPtr] = 1; this.expressionLengthPtr--; this.astStack[++this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], null, this.intStack[this.intPtr--], this.endStatementPosition); } else { this.expressionLengthPtr--; this.astStack[this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], (Block) this.astStack[this.astPtr], this.intStack[this.intPtr--], this.endStatementPosition); } this.modifiers = ClassFileConstants.AccDefault; this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int) } protected void consumeStatementThrow() {
/** * @see SubRoutineStatement#generateSubRoutineInvocation(BlockScope, CodeStream, Object, int, LocalVariableBinding) */ public boolean generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream, Object targetLocation, int stateIndex, LocalVariableBinding secretLocal) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); return false; }
@Override public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output); output.append("synchronized ("); //$NON-NLS-1$ this.expression.printExpression(0, output).append(')'); output.append('\n'); return this.block.printStatement(indent + 1, output); }
enterAnyExceptionHandler(codeStream); this.block.generateCode(this.scope, codeStream); if (this.scope != currentScope) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.goto_(endLabel); enterAnyExceptionHandler(codeStream); codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSynchronizedInitStateIndex); placeAllAnyExceptionHandler(); codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.athrow();
enterAnyExceptionHandler(codeStream); this.block.generateCode(this.scope, codeStream); if (this.scope != currentScope) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.goto_(endLabel); enterAnyExceptionHandler(codeStream); codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSynchronizedInitStateIndex); placeAllAnyExceptionHandler(); codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.athrow();
enterAnyExceptionHandler(codeStream); this.block.generateCode(this.scope, codeStream); if (this.scope != currentScope) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.goto_(endLabel); enterAnyExceptionHandler(codeStream); codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSynchronizedInitStateIndex); placeAllAnyExceptionHandler(); codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.athrow();
protected void consumeStatementSynchronized() { // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block //optimize the push/pop if (this.astLengthStack[this.astLengthPtr] == 0) { this.astLengthStack[this.astLengthPtr] = 1; this.expressionLengthPtr--; this.astStack[++this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], null, this.intStack[this.intPtr--], this.endStatementPosition); } else { this.expressionLengthPtr--; this.astStack[this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], (Block) this.astStack[this.astPtr], this.intStack[this.intPtr--], this.endStatementPosition); } this.modifiers = ClassFileConstants.AccDefault; this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int) } protected void consumeStatementThrow() {
public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output); output.append("synchronized ("); //$NON-NLS-1$ this.expression.printExpression(0, output).append(')'); output.append('\n'); return this.block.printStatement(indent + 1, output); }
/** * @see SubRoutineStatement#generateSubRoutineInvocation(BlockScope, CodeStream, Object, int, LocalVariableBinding) */ @Override public boolean generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream, Object targetLocation, int stateIndex, LocalVariableBinding secretLocal) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); return false; }
enterAnyExceptionHandler(codeStream); this.block.generateCode(this.scope, codeStream); if (this.scope != currentScope) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.goto_(endLabel); enterAnyExceptionHandler(codeStream); codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSynchronizedInitStateIndex); placeAllAnyExceptionHandler(); codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.athrow();
protected void consumeStatementSynchronized() { // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block //optimize the push/pop if (this.astLengthStack[this.astLengthPtr] == 0) { this.astLengthStack[this.astLengthPtr] = 1; this.expressionLengthPtr--; this.astStack[++this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], null, this.intStack[this.intPtr--], this.endStatementPosition); } else { this.expressionLengthPtr--; this.astStack[this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], (Block) this.astStack[this.astPtr], this.intStack[this.intPtr--], this.endStatementPosition); } this.modifiers = ClassFileConstants.AccDefault; this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int) } protected void consumeStatementThrow() {
public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output); output.append("synchronized ("); //$NON-NLS-1$ this.expression.printExpression(0, output).append(')'); output.append('\n'); return this.block.printStatement(indent + 1, output); }
/** * @see SubRoutineStatement#generateSubRoutineInvocation(BlockScope, CodeStream, Object, int, LocalVariableBinding) */ public boolean generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream, Object targetLocation, int stateIndex, LocalVariableBinding secretLocal) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); return false; }
enterAnyExceptionHandler(codeStream); this.block.generateCode(this.scope, codeStream); if (this.scope != currentScope) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.goto_(endLabel); enterAnyExceptionHandler(codeStream); codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSynchronizedInitStateIndex); placeAllAnyExceptionHandler(); codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.athrow();
protected void consumeStatementSynchronized() { // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block //optimize the push/pop if (this.astLengthStack[this.astLengthPtr] == 0) { this.astLengthStack[this.astLengthPtr] = 1; this.expressionLengthPtr--; this.astStack[++this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], null, this.intStack[this.intPtr--], this.endStatementPosition); } else { this.expressionLengthPtr--; this.astStack[this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], (Block) this.astStack[this.astPtr], this.intStack[this.intPtr--], this.endStatementPosition); } this.modifiers = ClassFileConstants.AccDefault; this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int) } protected void consumeStatementThrow() {
public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output); output.append("synchronized ("); //$NON-NLS-1$ this.expression.printExpression(0, output).append(')'); output.append('\n'); return this.block.printStatement(indent + 1, output); }
/** * @see SubRoutineStatement#generateSubRoutineInvocation(BlockScope, CodeStream, Object, int, LocalVariableBinding) */ public boolean generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream, Object targetLocation, int stateIndex, LocalVariableBinding secretLocal) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); return false; }
enterAnyExceptionHandler(codeStream); this.block.generateCode(this.scope, codeStream); if (this.scope != currentScope) { codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.goto_(endLabel); enterAnyExceptionHandler(codeStream); codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSynchronizedInitStateIndex); placeAllAnyExceptionHandler(); codeStream.load(this.synchroVariable); codeStream.monitorexit(); exitAnyExceptionHandler(); codeStream.athrow();
protected void consumeStatementSynchronized() { // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block //optimize the push/pop if (this.astLengthStack[this.astLengthPtr] == 0) { this.astLengthStack[this.astLengthPtr] = 1; this.expressionLengthPtr--; this.astStack[++this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], null, this.intStack[this.intPtr--], this.endStatementPosition); } else { this.expressionLengthPtr--; this.astStack[this.astPtr] = new SynchronizedStatement( this.expressionStack[this.expressionPtr--], (Block) this.astStack[this.astPtr], this.intStack[this.intPtr--], this.endStatementPosition); } this.modifiers = ClassFileConstants.AccDefault; this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int) } protected void consumeStatementThrow() {
public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output); output.append("synchronized ("); //$NON-NLS-1$ this.expression.printExpression(0, output).append(')'); output.append('\n'); return this.block.printStatement(indent + 1, output); }