Пример #1
0
 public static int genAssignInstanceFieldFromParam(
     FieldInfo info, int index, InstructionAdapter iv) {
   assert !info.isStatic();
   Type fieldType = info.getFieldType();
   iv.load(0, info.getOwnerType()); // this
   iv.load(index, fieldType); // param
   iv.visitFieldInsn(
       PUTFIELD, info.getOwnerInternalName(), info.getFieldName(), fieldType.getDescriptor());
   index += fieldType.getSize();
   return index;
 }
Пример #2
0
 public static void genInitSingletonField(FieldInfo info, InstructionAdapter iv) {
   assert info.isStatic();
   genInitSingletonField(info.getOwnerType(), info.getFieldName(), info.getFieldType(), iv);
 }