int unboxedVariableTypeId = getUnBoxedTypeId(leftHandSide);
int unboxedValueTypeId = getUnBoxedTypeId(rightHandSide);
int unboxedResultTypeId = Instruction.getBinaryPromotionType(
unboxedVariableTypeId, unboxedValueTypeId);
push(new AssignmentOperator(variableTypeId, variableTypeId,
fCounter));
leftHandSide.accept(this);
if (char0 == '=') {
boolean storeRequired = false;
if (rightBinding.isPrimitive()) {
boxing(leftBinding, rightBinding);
storeRequired = true;
}
rightHandSide.accept(this);
if (storeRequired) {
storeInstruction(); // boxing
}
} else {
boolean unrecognized = false;
boxing(leftBinding, rightBinding);
switch (char0) {
case '=': // equal
break;
case '+': // plus equal
push(new PlusOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '-': // minus equal
push(new MinusOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '*': // multiply equal
push(new MultiplyOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '/': // divide equal
push(new DivideOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '%': // remainder equal
push(new RemainderOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '^': // XOr equal
push(new XorOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '|': // or equal
push(new OrOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '&': // and equal
push(new AndOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '<': // left shift equal
push(new LeftShiftOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId, fCounter));
break;
case '>': // right shift equal or unsigned right shift equal
switch (char2) {
case '=': // right shift equal
push(new RightShiftOperator(unboxedVariableTypeId,
unboxedValueTypeId, unboxedResultTypeId,
fCounter));
break;
case '>': // unsigned right shift equal
push(new UnsignedRightShiftOperator(
unboxedVariableTypeId, unboxedValueTypeId,
unboxedResultTypeId, fCounter));
break;
default:
unrecognized = true;
break;
}
break;
default:
unrecognized = true;
break;
}
if (unrecognized) {
setHasError(true);
addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Unrecognized_assignment_operator____4
+ opToken);
return false;
}
unBoxing(leftBinding);
push(new Dup());
storeInstruction(); // dupe
storeInstruction(); // un-boxing
boolean storeRequired = unBoxing(rightBinding);
rightHandSide.accept(this);
if (storeRequired) {
storeInstruction(); // un-boxing
}
storeInstruction(); // operation
storeInstruction(); // boxing
}
} else {
boolean unrecognized = false;
switch (char0) {
case '=': // equal
push(new AssignmentOperator(variableTypeId, valueTypeId,
fCounter));
break;
case '+': // plus equal
push(new PlusAssignmentOperator(variableTypeId, valueTypeId,
fCounter));