opc_getfield,
getjdoStateManagerFieldRef()));
insn = insn.append(InsnUtils.aStore(varStart, pool));
// test the sm field and return field if null
final InsnTarget callIsLoaded = new InsnTarget();
insn = insn.append(InsnUtils.aLoad(varStart, pool));
insn = insn.append(Insn.create(opc_ifnonnull, callIsLoaded));
insn = appendDirectReadReturn(insn, fieldRef);
// call sm for isLoaded
insn = insn.append(callIsLoaded);
insn = insn.append(InsnUtils.aLoad(varStart, pool));
// push instance
insn = insn.append(Insn.create(opc_aload_0));
// push absolute field index
insn = insn.append(
Insn.create(opc_getstatic,
pool.addFieldRef(
className,
JDO_PC_jdoInheritedFieldCount_Name,
JDO_PC_jdoInheritedFieldCount_Sig)));
insn = insn.append(InsnUtils.integerConstant(fieldIndex, pool));
insn = insn.append(Insn.create(opc_iadd));
// test result of isLoaded and return field if nonzero
final InsnTarget mediate = new InsnTarget();
insn = insn.append(
new InsnInterfaceInvoke(
pool.addInterfaceMethodRef(
JDO_StateManager_Path,
JDO_SM_isLoaded_Name,