break;
case Binding.LOCAL : // reading the first local variable
if (!needValue) break; // no value needed
LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
// regular local variable read
Constant localConstant = localBinding.constant();
if (localConstant != Constant.NotAConstant) {
codeStream.generateConstant(localConstant, 0);
// no implicit conversion
} else {
// outer local?
if ((this.bits & ASTNode.DepthMASK) != 0) {
// outer local can be reached either through a synthetic arg or a synthetic field
VariableBinding[] path = currentScope.getEmulationPath(localBinding);
codeStream.generateOuterAccess(path, this, localBinding, currentScope);
} else {
codeStream.load(localBinding);
}
}
}
// all intermediate field accesses are read accesses
// only the last field binding is a write access
int positionsLength = this.sourcePositions.length;
if (this.otherCodegenBindings != null) {
for (int i = 0; i < otherBindingsCount; i++) {
int pc = codeStream.position;
FieldBinding nextField = this.otherCodegenBindings[i];
TypeBinding nextGenericCast = this.otherGenericCasts == null ? null : this.otherGenericCasts[i];
if (lastFieldBinding != null) {
needValue = !nextField.isStatic();
Constant fieldConstant = lastFieldBinding.constant();
if (fieldConstant != Constant.NotAConstant) {
if (i > 0 && !lastFieldBinding.isStatic()) {
codeStream.invokeObjectGetClass(); // perform null check
codeStream.pop();
}