Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation Stephan Herrmann - Contribution for bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null" bug 383368 - [compiler][null] syntactic null analysis for field references /
  
  package org.eclipse.jdt.internal.compiler.ast;
  
  
  public class BinaryExpression extends OperatorExpression {
  
  /* Tracking helpers
   * The following are used to elaborate realistic statistics about binary
   * expressions. This must be neutralized in the released code.
   * Search the keyword BE_INSTRUMENTATION to reenable.
   * An external device must install a suitable probe so as to monitor the
   * emission of events and publish the results.
  	public interface Probe {
  		public void ping(int depth);
  	}
  	public int depthTracker;
  	public static Probe probe;
   */
  
  	public Expression leftright;
  
  public BinaryExpression(Expression leftExpression rightint operator) {
  	this. = left;
  	this. = right;
  	this. |= operator << .// encode operator
  	this. = left.sourceStart;
  	this. = right.sourceEnd;
  	// BE_INSTRUMENTATION: neutralized in the released code
  //	if (left instanceof BinaryExpression &&
  //			((left.bits & OperatorMASK) ^ (this.bits & OperatorMASK)) == 0) {
  //		this.depthTracker = ((BinaryExpression)left).depthTracker + 1;
  //	} else {
  //		this.depthTracker = 1;
  //	}
  }
  public BinaryExpression(BinaryExpression expression) {
  	this. = expression.left;
  	this. = expression.right;
  	this. = expression.bits;
  	this. = expression.sourceStart;
  	this. = expression.sourceEnd;
  }
  public FlowInfo analyseCode(BlockScope currentScopeFlowContext flowContextFlowInfo flowInfo) {
  	// keep implementation in sync with CombinedBinaryExpression#analyseCode
  	try {
  		if (this.. == .) {
  			return this..analyseCode(
  								currentScopeflowContext,
  								this..analyseCode(currentScopeflowContextflowInfo).unconditionalInits())
  		} else {
  			this..checkNPE(currentScopeflowContextflowInfo);
  			flowInfo = this..analyseCode(currentScopeflowContextflowInfo).unconditionalInits();
  			if (((this. & ) >> ) != ) {
  				flowContext.expireNullCheckedFieldInfo();
  			}
  			this..checkNPE(currentScopeflowContextflowInfo);
  			flowInfo = this..analyseCode(currentScopeflowContextflowInfo).unconditionalInits();
  			if (((this. & ) >> ) != ) {
  				flowContext.expireNullCheckedFieldInfo();
  			}
  			return flowInfo;
  		}
  	} finally {
  		// account for exception possibly thrown by arithmetics
  		flowContext.recordAbruptExit();
  	}
  }
  
  public void computeConstant(BlockScope scopeint leftIdint rightId) {
  	//compute the constant when valid
  	if ((this.. != .)
  		&& (this.. != .)) {
  		try {
  			this. =
  					this..,
  					leftId,
  					this..,
 					rightId);
 		} catch (ArithmeticException e) {
 			// 1.2 no longer throws an exception at compile-time
 			//scope.problemReporter().compileTimeConstantThrowsArithmeticException(this);
 		}
 	} else {
 		//add some work for the boolean operators & |
 			leftId,
 			rightId);
 	}
 }
 
 	return this. == null ? this. : this.;
 }

Code generation for a binary operation
 
 // given the current focus of CombinedBinaryExpression on strings concatenation,
 // we do not provide a general, non-recursive implementation of generateCode,
 // but rely upon generateOptimizedStringConcatenationCreation instead
 public void generateCode(BlockScope currentScopeCodeStream codeStreamboolean valueRequired) {
 	int pc = codeStream.position;
 	if (this. != .) {
 		if (valueRequired)
 			codeStream.generateConstant(this.this.);
 		codeStream.recordPositionsFrom(pcthis.);
 		return;
 	}
 	switch ((this. & .) >> .) {
 		case  :
 			switch (this. & .) {
 					// BE_INSTRUMENTATION: neutralized in the released code
 //					if (probe != null) {
 //						probe.ping(this.depthTracker);
 //					}
 					codeStream.generateStringConcatenationAppend(currentScopethis.this.);
 					if (!valueRequired)
 						codeStream.pop();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.iadd();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.ladd();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.dadd();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.fadd();
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.isub();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.lsub();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.dsub();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.fsub();
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.imul();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.lmul();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.dmul();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.fmul();
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamtrue);
 					this..generateCode(currentScopecodeStreamtrue);
 					codeStream.idiv();
 					if (!valueRequired)
 						codeStream.pop();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamtrue);
 					this..generateCode(currentScopecodeStreamtrue);
 					codeStream.ldiv();
 					if (!valueRequired)
 						codeStream.pop2();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.ddiv();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.fdiv();
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamtrue);
 					this..generateCode(currentScopecodeStreamtrue);
 					codeStream.irem();
 					if (!valueRequired)
 						codeStream.pop();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamtrue);
 					this..generateCode(currentScopecodeStreamtrue);
 					codeStream.lrem();
 					if (!valueRequired)
 						codeStream.pop2();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.drem();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.frem();
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					// 0 & x
 						&& (this...typeID() == .)
 						&& (this...intValue() == 0)) {
 						this..generateCode(currentScopecodeStreamfalse);
 						if (valueRequired)
 							codeStream.iconst_0();
 					} else {
 						// x & 0
 							&& (this...typeID() == .)
 							&& (this...intValue() == 0)) {
 							this..generateCode(currentScopecodeStreamfalse);
 							if (valueRequired)
 								codeStream.iconst_0();
 						} else {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							if (valueRequired)
 								codeStream.iand();
 						}
 					}
 					break;
 				case  :
 					// 0 & x
 						&& (this...typeID() == .)
 						&& (this...longValue() == 0L)) {
 						this..generateCode(currentScopecodeStreamfalse);
 						if (valueRequired)
 							codeStream.lconst_0();
 					} else {
 						// x & 0
 							&& (this...typeID() == .)
 							&& (this...longValue() == 0L)) {
 							this..generateCode(currentScopecodeStreamfalse);
 							if (valueRequired)
 								codeStream.lconst_0();
 						} else {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							if (valueRequired)
 								codeStream.land();
 						}
 					}
 					break;
 				case  : // logical and
 					generateLogicalAnd(currentScopecodeStreamvalueRequired);
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					// 0 | x
 						&& (this...typeID() == .)
 						&& (this...intValue() == 0)) {
 						this..generateCode(currentScopecodeStreamvalueRequired);
 					} else {
 						// x | 0
 							&& (this...typeID() == .)
 							&& (this...intValue() == 0)) {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 						} else {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							if (valueRequired)
 								codeStream.ior();
 						}
 					}
 					break;
 				case  :
 					// 0 | x
 						&& (this...typeID() == .)
 						&& (this...longValue() == 0L)) {
 						this..generateCode(currentScopecodeStreamvalueRequired);
 					} else {
 						// x | 0
 							&& (this...typeID() == .)
 							&& (this...longValue() == 0L)) {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 						} else {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							if (valueRequired)
 								codeStream.lor();
 						}
 					}
 					break;
 				case  : // logical or
 					generateLogicalOr(currentScopecodeStreamvalueRequired);
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					// 0 ^ x
 						&& (this...typeID() == .)
 						&& (this...intValue() == 0)) {
 						this..generateCode(currentScopecodeStreamvalueRequired);
 					} else {
 						// x ^ 0
 							&& (this...typeID() == .)
 							&& (this...intValue() == 0)) {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 						} else {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							if (valueRequired)
 								codeStream.ixor();
 						}
 					}
 					break;
 				case  :
 					// 0 ^ x
 						&& (this...typeID() == .)
 						&& (this...longValue() == 0L)) {
 						this..generateCode(currentScopecodeStreamvalueRequired);
 					} else {
 						// x ^ 0
 							&& (this...typeID() == .)
 							&& (this...longValue() == 0L)) {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 						} else {
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							this..generateCode(currentScopecodeStreamvalueRequired);
 							if (valueRequired)
 								codeStream.lxor();
 						}
 					}
 					break;
 				case  :
 					generateLogicalXor(currentScopecodeStreamvalueRequired);
 					break;
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.ishl();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.lshl();
 			}
 			break;
 		case  :
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.ishr();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.lshr();
 			}
 			break;
 			switch (this. & .) {
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.iushr();
 					break;
 				case  :
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					this..generateCode(currentScopecodeStreamvalueRequired);
 					if (valueRequired)
 						codeStream.lushr();
 			}
 			break;
 		case  :
 			BranchLabel falseLabelendLabel;
 				currentScope,
 				codeStream,
 				null,
 				(falseLabel = new BranchLabel(codeStream)),
 				valueRequired);
 			if (valueRequired) {
 				codeStream.iconst_1();
 				if ((this. & .) != 0) {
 					codeStream.generateReturnBytecode(this);
 					falseLabel.place();
 					codeStream.iconst_0();
 				} else {
 					codeStream.goto_(endLabel = new BranchLabel(codeStream));
 					codeStream.decrStackSize(1);
 					falseLabel.place();
 					codeStream.iconst_0();
 					endLabel.place();
 				}
 			}
 			break;
 		case  :
 				currentScope,
 				codeStream,
 				null,
 				(falseLabel = new BranchLabel(codeStream)),
 				valueRequired);
 			if (valueRequired) {
 				codeStream.iconst_1();
 				if ((this. & .) != 0) {
 					codeStream.generateReturnBytecode(this);
 					falseLabel.place();
 					codeStream.iconst_0();
 				} else {
 					codeStream.goto_(endLabel = new BranchLabel(codeStream));
 					codeStream.decrStackSize(1);
 					falseLabel.place();
 					codeStream.iconst_0();
 					endLabel.place();
 				}
 			}
 			break;
 		case  :
 				currentScope,
 				codeStream,
 				null,
 				(falseLabel = new BranchLabel(codeStream)),
 				valueRequired);
 			if (valueRequired) {
 				codeStream.iconst_1();
 				if ((this. & .) != 0) {
 					codeStream.generateReturnBytecode(this);
 					falseLabel.place();
 					codeStream.iconst_0();
 				} else {
 					codeStream.goto_(endLabel = new BranchLabel(codeStream));
 					codeStream.decrStackSize(1);
 					falseLabel.place();
 					codeStream.iconst_0();
 					endLabel.place();
 				}
 			}
 			break;
 		case  :
 				currentScope,
 				codeStream,
 				null,
 				(falseLabel = new BranchLabel(codeStream)),
 				valueRequired);
 			if (valueRequired) {
 				codeStream.iconst_1();
 				if ((this. & .) != 0) {
 					codeStream.generateReturnBytecode(this);
 					falseLabel.place();
 					codeStream.iconst_0();
 				} else {
 					codeStream.goto_(endLabel = new BranchLabel(codeStream));
 					codeStream.decrStackSize(1);
 					falseLabel.place();
 					codeStream.iconst_0();
 					endLabel.place();
 				}
 			}
 	}
 	if (valueRequired) {
 	}
 	codeStream.recordPositionsFrom(pcthis.);
 }

Boolean operator code generation Optimized operations are: <, <=, >, >=, &, |, ^
 
 public void generateOptimizedBoolean(BlockScope currentScopeCodeStream codeStreamBranchLabel trueLabelBranchLabel falseLabelboolean valueRequired) {
 	if ((this. != .) && (this..typeID() == .)) {
 			currentScope,
 			codeStream,
 			trueLabel,
 			falseLabel,
 			valueRequired);
 		return;
 	}
 	switch ((this. & .) >> .) {
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 		case  :
 				currentScope,
 				codeStream,
 				trueLabel,
 				falseLabel,
 				valueRequired);
 			return;
 	}
 		currentScope,
 		codeStream,
 		trueLabel,
 		falseLabel,
 		valueRequired);
 }

Boolean generation for >
 
 public void generateOptimizedGreaterThan(BlockScope currentScopeCodeStream codeStreamBranchLabel trueLabelBranchLabel falseLabelboolean valueRequired) {
 	int promotedTypeID = (this.. & .) >> 4;
 	// both sides got promoted in the same way
 	if (promotedTypeID == .) {
 		// 0 > x
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.iflt(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
 						codeStream.ifge(falseLabel);
 					} else {
 						// no implicit fall through TRUE/FALSE --> should never occur
 					}
 				}
 			}
 			// reposition the endPC
 			codeStream.recordPositionsFrom(codeStream.positionthis.);
 			return;
 		}
 		// x > 0
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.ifgt(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
 						codeStream.ifle(falseLabel);
 					} else {
 						// no implicit fall through TRUE/FALSE --> should never occur
 					}
 				}
 			}
 			// reposition the endPC
 			codeStream.recordPositionsFrom(codeStream.positionthis.);
 			return;
 		}
 	}
 	// default comparison
 	this..generateCode(currentScopecodeStreamvalueRequired);
 	this..generateCode(currentScopecodeStreamvalueRequired);
 	if (valueRequired) {
 		if (falseLabel == null) {
 			if (trueLabel != null) {
 				// implicit falling through the FALSE case
 				switch (promotedTypeID) {
 					case  :
 						codeStream.if_icmpgt(trueLabel);
 						break;
 					case  :
 						codeStream.fcmpl();
 						codeStream.ifgt(trueLabel);
 						break;
 					case  :
 						codeStream.lcmp();
 						codeStream.ifgt(trueLabel);
 						break;
 					case  :
 						codeStream.dcmpl();
 						codeStream.ifgt(trueLabel);
 				}
 				// reposition the endPC
 				codeStream.recordPositionsFrom(codeStream.positionthis.);
 				return;
 			}
 		} else {
 			if (trueLabel == null) {
 				// implicit falling through the TRUE case
 				switch (promotedTypeID) {
 					case  :
 						codeStream.if_icmple(falseLabel);
 						break;
 					case  :
 						codeStream.fcmpl();
 						codeStream.ifle(falseLabel);
 						break;
 					case  :
 						codeStream.lcmp();
 						codeStream.ifle(falseLabel);
 						break;
 					case  :
 						codeStream.dcmpl();
 						codeStream.ifle(falseLabel);
 				}
 				// reposition the endPC
 				codeStream.recordPositionsFrom(codeStream.positionthis.);
 				return;
 			} else {
 				// no implicit fall through TRUE/FALSE --> should never occur
 			}
 		}
 	}
 }

Boolean generation for >=
 
 public void generateOptimizedGreaterThanOrEqual(BlockScope currentScopeCodeStream codeStreamBranchLabel trueLabelBranchLabel falseLabelboolean valueRequired) {
 	int promotedTypeID = (this.. & .) >> 4;
 	// both sides got promoted in the same way
 	if (promotedTypeID == .) {
 		// 0 >= x
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.ifle(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
 						codeStream.ifgt(falseLabel);
 					} else {
 						// no implicit fall through TRUE/FALSE --> should never occur
 					}
 				}
 			}
 			// reposition the endPC
 			codeStream.recordPositionsFrom(codeStream.positionthis.);
 			return;
 		}
 		// x >= 0
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.ifge(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
 						codeStream.iflt(falseLabel);
 					} else {
 						// no implicit fall through TRUE/FALSE --> should never occur
 					}
 				}
 			}
 			// reposition the endPC
 			codeStream.recordPositionsFrom(codeStream.positionthis.);
 			return;
 		}
 	}
 	// default comparison
 	this..generateCode(currentScopecodeStreamvalueRequired);
 	this..generateCode(currentScopecodeStreamvalueRequired);
 	if (valueRequired) {
 		if (falseLabel == null) {
 			if (trueLabel != null) {
 				// implicit falling through the FALSE case
 				switch (promotedTypeID) {
 					case  :
 						codeStream.if_icmpge(trueLabel);
 						break;
 					case  :
 						codeStream.fcmpl();
 						codeStream.ifge(trueLabel);
 						break;
 					case  :
 						codeStream.lcmp();
 						codeStream.ifge(trueLabel);
 						break;
 					case  :
 						codeStream.dcmpl();
 						codeStream.ifge(trueLabel);
 				}
 				// reposition the endPC
 				codeStream.recordPositionsFrom(codeStream.positionthis.);
 				return;
 			}
 		} else {
 			if (trueLabel == null) {
 				// implicit falling through the TRUE case
 				switch (promotedTypeID) {
 					case  :
 						codeStream.if_icmplt(falseLabel);
 						break;
 					case  :
 						codeStream.fcmpl();
 						codeStream.iflt(falseLabel);
 						break;
 					case  :
 						codeStream.lcmp();
 						codeStream.iflt(falseLabel);
 						break;
 					case  :
 						codeStream.dcmpl();
 						codeStream.iflt(falseLabel);
 				}
 				// reposition the endPC
 				codeStream.recordPositionsFrom(codeStream.positionthis.);
 				return;
 			} else {
 				// no implicit fall through TRUE/FALSE --> should never occur
 			}
 		}
 	}
 }

Boolean generation for <
 
 public void generateOptimizedLessThan(BlockScope currentScopeCodeStream codeStreamBranchLabel trueLabelBranchLabel falseLabelboolean valueRequired) {
 	int promotedTypeID = (this.. & .) >> 4;
 	// both sides got promoted in the same way
 	if (promotedTypeID == .) {
 		// 0 < x
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.ifgt(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
 						codeStream.ifle(falseLabel);
 					} else {
 						// no implicit fall through TRUE/FALSE --> should never occur
 					}
 				}
 			}
 			codeStream.recordPositionsFrom(codeStream.positionthis.);
 			return;
 		}
 		// x < 0
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.iflt(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
 						codeStream.ifge(falseLabel);
 					} else {
 						// no implicit fall through TRUE/FALSE --> should never occur
 					}
 				}
 			}
 			codeStream.recordPositionsFrom(codeStream.positionthis.);
 			return;
 		}
 	}
 	// default comparison
 	this..generateCode(currentScopecodeStreamvalueRequired);
 	this..generateCode(currentScopecodeStreamvalueRequired);
 	if (valueRequired) {
 		if (falseLabel == null) {
 			if (trueLabel != null) {
 				// implicit falling through the FALSE case
 				switch (promotedTypeID) {
 					case  :
 						codeStream.if_icmplt(trueLabel);
 						break;
 					case  :
 						codeStream.fcmpg();
 						codeStream.iflt(trueLabel);
 						break;
 					case  :
 						codeStream.lcmp();
 						codeStream.iflt(trueLabel);
 						break;
 					case  :
 						codeStream.dcmpg();
 						codeStream.iflt(trueLabel);
 				}
 				codeStream.recordPositionsFrom(codeStream.positionthis.);
 				return;
 			}
 		} else {
 			if (trueLabel == null) {
 				// implicit falling through the TRUE case
 				switch (promotedTypeID) {
 					case  :
 						codeStream.if_icmpge(falseLabel);
 						break;
 					case  :
 						codeStream.fcmpg();
 						codeStream.ifge(falseLabel);
 						break;
 					case  :
 						codeStream.lcmp();
 						codeStream.ifge(falseLabel);
 						break;
 					case  :
 						codeStream.dcmpg();
 						codeStream.ifge(falseLabel);
 				}
 				codeStream.recordPositionsFrom(codeStream.positionthis.);
 				return;
 			} else {
 				// no implicit fall through TRUE/FALSE --> should never occur
 			}
 		}
 	}
 }

Boolean generation for <=
 
 public void generateOptimizedLessThanOrEqual(BlockScope currentScopeCodeStream codeStreamBranchLabel trueLabelBranchLabel falseLabelboolean valueRequired) {
 	int promotedTypeID = (this.. & .) >> 4;
 	// both sides got promoted in the same way
 	if (promotedTypeID == .) {
 		// 0 <= x
 		if ((this.. != .) && (this...intValue() == 0)) {
 			this..generateCode(currentScopecodeStreamvalueRequired);
 			if (valueRequired) {
 				if (falseLabel == null) {
 					if (trueLabel != null) {
 						// implicitly falling through the FALSE case
 						codeStream.ifge(trueLabel);
 					}
 				} else {
 					if (trueLabel == null) {
 						// implicitly falling through the TRUE case
						codeStream.iflt(falseLabel);
else {
						// no implicit fall through TRUE/FALSE --> should never occur