String getAccessName = makeUnique(methodNames, "getfieldvalue_" + node.name);
getAccess = new MethodNode(ACC_SYNTHETIC | ACC_FINAL, getAccessName, "()" + node.desc, null, null);
InstructionBuilder builder = newBuilder(getAccess);
// Get the correct FieldConduit object on the stack
pushFieldConduitOntoStack(conduitFieldName, builder);
builder.loadThis();
// Now push the instance context on the stack
pushInstanceContextFieldOntoStack(builder);
builder.invoke(FieldConduit.class, Object.class, "get", Object.class, InstanceContext.class).castOrUnbox(
typeName);
if (writeBehindEnabled)
{
// Dupe the value, then push this, then swap
if (isWide())
{
// Dupe this under the wide value, then pop the wide value
builder.dupeWide().loadThis().dupe(2).pop();
}
else
{
builder.dupe().loadThis().swap();
}
// At which point the stack is the result value, this, the result value
builder.putField(className, node.name, typeName);
// And now it is just the result value
}
builder.returnResult();
addMethod(getAccess);
fieldToReadMethod.put(node.name, getAccess);
}