Java Code Examples for org.springframework.expression.spel.CodeFlow#insertUnboxInsns()

The following examples show how to use org.springframework.expression.spel.CodeFlow#insertUnboxInsns() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpelNodeImpl.java    From spring-analysis-note with MIT License 6 votes vote down vote up
/**
 * Ask an argument to generate its bytecode and then follow it up
 * with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor.
 */
protected static void generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc) {
	cf.enterCompilationScope();
	argument.generateCode(mv, cf);
	String lastDesc = cf.lastDescriptor();
	Assert.state(lastDesc != null, "No last descriptor");
	boolean primitiveOnStack = CodeFlow.isPrimitive(lastDesc);
	// Check if need to box it for the method reference?
	if (primitiveOnStack && paramDesc.charAt(0) == 'L') {
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	else if (paramDesc.length() == 1 && !primitiveOnStack) {
		CodeFlow.insertUnboxInsns(mv, paramDesc.charAt(0), lastDesc);
	}
	else if (!paramDesc.equals(lastDesc)) {
		// This would be unnecessary in the case of subtyping (e.g. method takes Number but Integer passed in)
		CodeFlow.insertCheckCast(mv, paramDesc);
	}
	cf.exitCompilationScope();
}
 
Example 2
Source File: SpelNodeImpl.java    From java-technology-stack with MIT License 6 votes vote down vote up
/**
 * Ask an argument to generate its bytecode and then follow it up
 * with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor.
 */
protected static void generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc) {
	cf.enterCompilationScope();
	argument.generateCode(mv, cf);
	String lastDesc = cf.lastDescriptor();
	Assert.state(lastDesc != null, "No last descriptor");
	boolean primitiveOnStack = CodeFlow.isPrimitive(lastDesc);
	// Check if need to box it for the method reference?
	if (primitiveOnStack && paramDesc.charAt(0) == 'L') {
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	else if (paramDesc.length() == 1 && !primitiveOnStack) {
		CodeFlow.insertUnboxInsns(mv, paramDesc.charAt(0), lastDesc);
	}
	else if (!paramDesc.equals(lastDesc)) {
		// This would be unnecessary in the case of subtyping (e.g. method takes Number but Integer passed in)
		CodeFlow.insertCheckCast(mv, paramDesc);
	}
	cf.exitCompilationScope();
}
 
Example 3
Source File: SpelNodeImpl.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Ask an argument to generate its bytecode and then follow it up
 * with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor.
 */
protected static void generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc) {
	cf.enterCompilationScope();
	argument.generateCode(mv, cf);
	String lastDesc = cf.lastDescriptor();
	boolean primitiveOnStack = CodeFlow.isPrimitive(lastDesc);
	// Check if need to box it for the method reference?
	if (primitiveOnStack && paramDesc.charAt(0) == 'L') {
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	else if (paramDesc.length() == 1 && !primitiveOnStack) {
		CodeFlow.insertUnboxInsns(mv, paramDesc.charAt(0), lastDesc);
	}
	else if (!paramDesc.equals(lastDesc)) {
		// This would be unnecessary in the case of subtyping (e.g. method takes Number but Integer passed in)
		CodeFlow.insertCheckCast(mv, paramDesc);
	}
	cf.exitCompilationScope();
}
 
Example 4
Source File: SpelNodeImpl.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
/**
 * Ask an argument to generate its bytecode and then follow it up
 * with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor.
 */
protected static void generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc) {
	cf.enterCompilationScope();
	argument.generateCode(mv, cf);
	boolean primitiveOnStack = CodeFlow.isPrimitive(cf.lastDescriptor());
	// Check if need to box it for the method reference?
	if (primitiveOnStack && paramDesc.charAt(0) == 'L') {
		CodeFlow.insertBoxIfNecessary(mv, cf.lastDescriptor().charAt(0));
	}
	else if (paramDesc.length() == 1 && !primitiveOnStack) {
		CodeFlow.insertUnboxInsns(mv, paramDesc.charAt(0), cf.lastDescriptor());
	}
	else if (!cf.lastDescriptor().equals(paramDesc)) {
		// This would be unnecessary in the case of subtyping (e.g. method takes Number but Integer passed in)
		CodeFlow.insertCheckCast(mv, paramDesc);
	}
	cf.exitCompilationScope();
}
 
Example 5
Source File: Ternary.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
	// May reach here without it computed if all elements are literals
	computeExitTypeDescriptor();
	cf.enterCompilationScope();
	this.children[0].generateCode(mv, cf);
	String lastDesc = cf.lastDescriptor();
	Assert.state(lastDesc != null, "No last descriptor");
	if (!CodeFlow.isPrimitive(lastDesc)) {
		CodeFlow.insertUnboxInsns(mv, 'Z', lastDesc);
	}
	cf.exitCompilationScope();
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	mv.visitJumpInsn(IFEQ, elseTarget);
	cf.enterCompilationScope();
	this.children[1].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		lastDesc = cf.lastDescriptor();
		Assert.state(lastDesc != null, "No last descriptor");
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitJumpInsn(GOTO, endOfIf);
	mv.visitLabel(elseTarget);
	cf.enterCompilationScope();
	this.children[2].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		lastDesc = cf.lastDescriptor();
		Assert.state(lastDesc != null, "No last descriptor");
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitLabel(endOfIf);
	cf.pushDescriptor(this.exitTypeDescriptor);
}
 
Example 6
Source File: Ternary.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
	// May reach here without it computed if all elements are literals
	computeExitTypeDescriptor();
	cf.enterCompilationScope();
	this.children[0].generateCode(mv, cf);
	String lastDesc = cf.lastDescriptor();
	Assert.state(lastDesc != null, "No last descriptor");
	if (!CodeFlow.isPrimitive(lastDesc)) {
		CodeFlow.insertUnboxInsns(mv, 'Z', lastDesc);
	}
	cf.exitCompilationScope();
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	mv.visitJumpInsn(IFEQ, elseTarget);
	cf.enterCompilationScope();
	this.children[1].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		lastDesc = cf.lastDescriptor();
		Assert.state(lastDesc != null, "No last descriptor");
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitJumpInsn(GOTO, endOfIf);
	mv.visitLabel(elseTarget);
	cf.enterCompilationScope();
	this.children[2].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		lastDesc = cf.lastDescriptor();
		Assert.state(lastDesc != null, "No last descriptor");
		CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitLabel(endOfIf);
	cf.pushDescriptor(this.exitTypeDescriptor);
}
 
Example 7
Source File: Ternary.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
	// May reach here without it computed if all elements are literals
	computeExitTypeDescriptor();
	cf.enterCompilationScope();
	this.children[0].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(cf.lastDescriptor())) {
		CodeFlow.insertUnboxInsns(mv, 'Z', cf.lastDescriptor());
	}
	cf.exitCompilationScope();
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	mv.visitJumpInsn(IFEQ, elseTarget);
	cf.enterCompilationScope();
	this.children[1].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		CodeFlow.insertBoxIfNecessary(mv, cf.lastDescriptor().charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitJumpInsn(GOTO, endOfIf);
	mv.visitLabel(elseTarget);
	cf.enterCompilationScope();
	this.children[2].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		CodeFlow.insertBoxIfNecessary(mv, cf.lastDescriptor().charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitLabel(endOfIf);
	cf.pushDescriptor(this.exitTypeDescriptor);
}
 
Example 8
Source File: Ternary.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
	// May reach here without it computed if all elements are literals
	computeExitTypeDescriptor();
	cf.enterCompilationScope();
	this.children[0].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(cf.lastDescriptor())) {
		CodeFlow.insertUnboxInsns(mv, 'Z', cf.lastDescriptor());
	}
	cf.exitCompilationScope();
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	mv.visitJumpInsn(IFEQ, elseTarget);
	cf.enterCompilationScope();
	this.children[1].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		CodeFlow.insertBoxIfNecessary(mv, cf.lastDescriptor().charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitJumpInsn(GOTO, endOfIf);
	mv.visitLabel(elseTarget);
	cf.enterCompilationScope();
	this.children[2].generateCode(mv, cf);
	if (!CodeFlow.isPrimitive(this.exitTypeDescriptor)) {
		CodeFlow.insertBoxIfNecessary(mv, cf.lastDescriptor().charAt(0));
	}
	cf.exitCompilationScope();
	mv.visitLabel(endOfIf);
	cf.pushDescriptor(this.exitTypeDescriptor);
}
 
Example 9
Source File: Operator.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Numeric comparison operators share very similar generated code, only differing in
 * two comparison instructions.
 */
protected void generateComparisonCode(MethodVisitor mv, CodeFlow cf, int compInstruction1, int compInstruction2) {
	SpelNodeImpl left = getLeftOperand();
	SpelNodeImpl right = getRightOperand();
	String leftDesc = left.exitTypeDescriptor;
	String rightDesc = right.exitTypeDescriptor;

	boolean unboxLeft = !CodeFlow.isPrimitive(leftDesc);
	boolean unboxRight = !CodeFlow.isPrimitive(rightDesc);
	DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(
			leftDesc, rightDesc, this.leftActualDescriptor, this.rightActualDescriptor);
	char targetType = dc.compatibleType;  // CodeFlow.toPrimitiveTargetDesc(leftDesc);

	cf.enterCompilationScope();
	left.generateCode(mv, cf);
	cf.exitCompilationScope();
	if (unboxLeft) {
		CodeFlow.insertUnboxInsns(mv, targetType, leftDesc);
	}

	cf.enterCompilationScope();
	right.generateCode(mv, cf);
	cf.exitCompilationScope();
	if (unboxRight) {
		CodeFlow.insertUnboxInsns(mv, targetType, rightDesc);
	}

	// assert: SpelCompiler.boxingCompatible(leftDesc, rightDesc)
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	if (targetType == 'D') {
		mv.visitInsn(DCMPG);
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType == 'F') {
		mv.visitInsn(FCMPG);
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType == 'J') {
		mv.visitInsn(LCMP);
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType == 'I') {
		mv.visitJumpInsn(compInstruction2, elseTarget);
	}
	else {
		throw new IllegalStateException("Unexpected descriptor " + leftDesc);
	}

	// Other numbers are not yet supported (isCompilable will not have returned true)
	mv.visitInsn(ICONST_1);
	mv.visitJumpInsn(GOTO,endOfIf);
	mv.visitLabel(elseTarget);
	mv.visitInsn(ICONST_0);
	mv.visitLabel(endOfIf);
	cf.pushDescriptor("Z");
}
 
Example 10
Source File: Operator.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** 
 * Numeric comparison operators share very similar generated code, only differing in 
 * two comparison instructions.
 */
protected void generateComparisonCode(MethodVisitor mv, CodeFlow cf, int compInstruction1, int compInstruction2) {
	String leftDesc = getLeftOperand().exitTypeDescriptor;
	String rightDesc = getRightOperand().exitTypeDescriptor;
	
	boolean unboxLeft = !CodeFlow.isPrimitive(leftDesc);
	boolean unboxRight = !CodeFlow.isPrimitive(rightDesc);
	DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(
			leftDesc, rightDesc, this.leftActualDescriptor, this.rightActualDescriptor);
	char targetType = dc.compatibleType;  // CodeFlow.toPrimitiveTargetDesc(leftDesc);
	
	cf.enterCompilationScope();
	getLeftOperand().generateCode(mv, cf);
	cf.exitCompilationScope();
	if (unboxLeft) {
		CodeFlow.insertUnboxInsns(mv, targetType, leftDesc);
	}

	cf.enterCompilationScope();
	getRightOperand().generateCode(mv, cf);
	cf.exitCompilationScope();
	if (unboxRight) {
		CodeFlow.insertUnboxInsns(mv, targetType, rightDesc);
	}

	// assert: SpelCompiler.boxingCompatible(leftDesc, rightDesc)
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	if (targetType == 'D') {
		mv.visitInsn(DCMPG);
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType == 'F') {
		mv.visitInsn(FCMPG);		
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType == 'J') {
		mv.visitInsn(LCMP);		
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType == 'I') {
		mv.visitJumpInsn(compInstruction2, elseTarget);
	}
	else {
		throw new IllegalStateException("Unexpected descriptor " + leftDesc);
	}

	// Other numbers are not yet supported (isCompilable will not have returned true)
	mv.visitInsn(ICONST_1);
	mv.visitJumpInsn(GOTO,endOfIf);
	mv.visitLabel(elseTarget);
	mv.visitInsn(ICONST_0);
	mv.visitLabel(endOfIf);
	cf.pushDescriptor("Z");
}
 
Example 11
Source File: OpNE.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
	String leftDesc = getLeftOperand().exitTypeDescriptor;
	String rightDesc = getRightOperand().exitTypeDescriptor;
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	boolean leftPrim = CodeFlow.isPrimitive(leftDesc);
	boolean rightPrim = CodeFlow.isPrimitive(rightDesc);

	DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc, rightDesc, leftActualDescriptor, rightActualDescriptor);
	
	if (dc.areNumbers && dc.areCompatible) {
		char targetType = dc.compatibleType;
		
		getLeftOperand().generateCode(mv, cf);
		if (!leftPrim) {
			CodeFlow.insertUnboxInsns(mv, targetType, leftDesc);
		}
	
		cf.enterCompilationScope();
		getRightOperand().generateCode(mv, cf);
		cf.exitCompilationScope();
		if (!rightPrim) {
			CodeFlow.insertUnboxInsns(mv, targetType, rightDesc);
		}
		// assert: SpelCompiler.boxingCompatible(leftDesc, rightDesc)
		if (targetType == 'D') {
			mv.visitInsn(DCMPL);
			mv.visitJumpInsn(IFEQ, elseTarget);
		}
		else if (targetType == 'F') {
			mv.visitInsn(FCMPL);		
			mv.visitJumpInsn(IFEQ, elseTarget);
		}
		else if (targetType == 'J') {
			mv.visitInsn(LCMP);		
			mv.visitJumpInsn(IFEQ, elseTarget);
		}
		else if (targetType == 'I' || targetType == 'Z') {
			mv.visitJumpInsn(IF_ICMPEQ, elseTarget);		
		}
		else {
			throw new IllegalStateException("Unexpected descriptor "+leftDesc);
		}
	}
	else {
		getLeftOperand().generateCode(mv, cf);
		getRightOperand().generateCode(mv, cf);
		mv.visitJumpInsn(IF_ACMPEQ, elseTarget);
	}
	mv.visitInsn(ICONST_1);
	mv.visitJumpInsn(GOTO,endOfIf);
	mv.visitLabel(elseTarget);
	mv.visitInsn(ICONST_0);
	mv.visitLabel(endOfIf);
	cf.pushDescriptor("Z");
}
 
Example 12
Source File: Operator.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/** 
 * Numeric comparison operators share very similar generated code, only differing in 
 * two comparison instructions.
 */
protected void generateComparisonCode(MethodVisitor mv, CodeFlow cf, int compInstruction1, int compInstruction2) {
	String leftDesc = getLeftOperand().exitTypeDescriptor;
	String rightDesc = getRightOperand().exitTypeDescriptor;
	
	boolean unboxLeft = !CodeFlow.isPrimitive(leftDesc);
	boolean unboxRight = !CodeFlow.isPrimitive(rightDesc);
	DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc, rightDesc,
			this.leftActualDescriptor, this.rightActualDescriptor);
	char targetType = dc.compatibleType;//CodeFlow.toPrimitiveTargetDesc(leftDesc);
	
	getLeftOperand().generateCode(mv, cf);
	if (unboxLeft) {
		CodeFlow.insertUnboxInsns(mv, targetType, leftDesc);
	}

	cf.enterCompilationScope();
	getRightOperand().generateCode(mv, cf);
	cf.exitCompilationScope();
	if (unboxRight) {
		CodeFlow.insertUnboxInsns(mv, targetType, rightDesc);
	}

	// assert: SpelCompiler.boxingCompatible(leftDesc, rightDesc)
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	if (targetType=='D') {
		mv.visitInsn(DCMPG);
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType=='F') {
		mv.visitInsn(FCMPG);		
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType=='J') {
		mv.visitInsn(LCMP);		
		mv.visitJumpInsn(compInstruction1, elseTarget);
	}
	else if (targetType=='I') {
		mv.visitJumpInsn(compInstruction2, elseTarget);
	}
	else {
		throw new IllegalStateException("Unexpected descriptor "+leftDesc);
	}

	// Other numbers are not yet supported (isCompilable will not have returned true)
	mv.visitInsn(ICONST_1);
	mv.visitJumpInsn(GOTO,endOfIf);
	mv.visitLabel(elseTarget);
	mv.visitInsn(ICONST_0);
	mv.visitLabel(endOfIf);
	cf.pushDescriptor("Z");
}
 
Example 13
Source File: OpEQ.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
	String leftDesc = getLeftOperand().exitTypeDescriptor;
	String rightDesc = getRightOperand().exitTypeDescriptor;
	Label elseTarget = new Label();
	Label endOfIf = new Label();
	boolean leftPrim = CodeFlow.isPrimitive(leftDesc);
	boolean rightPrim = CodeFlow.isPrimitive(rightDesc);

	DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc, rightDesc,
			this.leftActualDescriptor, this.rightActualDescriptor);
	
	if (dc.areNumbers && dc.areCompatible) {
		char targetType = dc.compatibleType;
		
		getLeftOperand().generateCode(mv, cf);
		if (!leftPrim) {
			CodeFlow.insertUnboxInsns(mv, targetType, leftDesc);
		}
	
		cf.enterCompilationScope();
		getRightOperand().generateCode(mv, cf);
		cf.exitCompilationScope();
		if (!rightPrim) {
			CodeFlow.insertUnboxInsns(mv, targetType, rightDesc);
		}
		// assert: SpelCompiler.boxingCompatible(leftDesc, rightDesc)
		if (targetType=='D') {
			mv.visitInsn(DCMPL);
			mv.visitJumpInsn(IFNE, elseTarget);
		}
		else if (targetType=='F') {
			mv.visitInsn(FCMPL);		
			mv.visitJumpInsn(IFNE, elseTarget);
		}
		else if (targetType=='J') {
			mv.visitInsn(LCMP);		
			mv.visitJumpInsn(IFNE, elseTarget);
		}
		else if (targetType=='I' || targetType=='Z') {
			mv.visitJumpInsn(IF_ICMPNE, elseTarget);		
		}
		else {
			throw new IllegalStateException("Unexpected descriptor "+leftDesc);
		}
	}
	else {
		getLeftOperand().generateCode(mv, cf);
		if (leftPrim) {
			CodeFlow.insertBoxIfNecessary(mv, leftDesc.charAt(0));
		}
		getRightOperand().generateCode(mv, cf);
		if (rightPrim) {
			CodeFlow.insertBoxIfNecessary(mv, rightDesc.charAt(0));
		}
		Label leftNotNull = new Label();
		mv.visitInsn(DUP_X1); // Dup right on the top of the stack
		mv.visitJumpInsn(IFNONNULL,leftNotNull);
		// Right is null!
		mv.visitInsn(SWAP);
		mv.visitInsn(POP); // remove it
		Label rightNotNull = new Label();
		mv.visitJumpInsn(IFNONNULL, rightNotNull);
		// Left is null too
		mv.visitInsn(ICONST_1);
		mv.visitJumpInsn(GOTO, endOfIf);
		mv.visitLabel(rightNotNull);
		mv.visitInsn(ICONST_0);
		mv.visitJumpInsn(GOTO,endOfIf);
		mv.visitLabel(leftNotNull);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "equals", "(Ljava/lang/Object;)Z", false);
		mv.visitLabel(endOfIf);
		cf.pushDescriptor("Z");
		return;
	}
	mv.visitInsn(ICONST_1);
	mv.visitJumpInsn(GOTO,endOfIf);
	mv.visitLabel(elseTarget);
	mv.visitInsn(ICONST_0);
	mv.visitLabel(endOfIf);
	cf.pushDescriptor("Z");
}