Lines 164-173
Link Here
|
164 |
if (hasThenPart) { |
164 |
if (hasThenPart) { |
165 |
BranchLabel falseLabel = null; |
165 |
BranchLabel falseLabel = null; |
166 |
// generate boolean condition only if needed |
166 |
// generate boolean condition only if needed |
167 |
if (((this.bits & ASTNode.IsElseStatementUnreachable) != 0) || |
167 |
if (cst != Constant.NotAConstant && cst.booleanValue() == true) { |
168 |
(cst != Constant.NotAConstant && cst.booleanValue() == true)) { |
|
|
169 |
// No need to generate if condition statement when we know that only the then action |
170 |
// will be executed |
171 |
this.condition.generateCode(currentScope, codeStream, false); |
168 |
this.condition.generateCode(currentScope, codeStream, false); |
172 |
} else { |
169 |
} else { |
173 |
this.condition.generateOptimizedBoolean( |
170 |
this.condition.generateOptimizedBoolean( |
Lines 206-213
Link Here
|
206 |
} |
203 |
} |
207 |
} else if (hasElsePart) { |
204 |
} else if (hasElsePart) { |
208 |
// generate boolean condition only if needed |
205 |
// generate boolean condition only if needed |
209 |
if (((this.bits & ASTNode.IsThenStatementUnreachable) != 0) || |
206 |
if (cst != Constant.NotAConstant && cst.booleanValue() == false) { |
210 |
(cst != Constant.NotAConstant && cst.booleanValue() == false)) { |
|
|
211 |
// No need to generate if condition statement when we know that only the else action |
207 |
// No need to generate if condition statement when we know that only the else action |
212 |
// will be executed |
208 |
// will be executed |
213 |
this.condition.generateCode(currentScope, codeStream, false); |
209 |
this.condition.generateCode(currentScope, codeStream, false); |