/** * Additional metadata about this method. */ public MethodData getMethodData() { if (methodData == null) { List<String> ivarNames = new ArrayList<>(); InterpreterContext context = ensureInstrsReady(); for (Instr i : context.getInstructions()) { switch (i.getOperation()) { case GET_FIELD: ivarNames.add(((GetFieldInstr) i).getId()); break; case PUT_FIELD: ivarNames.add(((PutFieldInstr) i).getId()); break; } } methodData = new MethodData(method.getId(), method.getFile(), ivarNames); } return methodData; } }
public VariableAccessor getAccessor(IRubyObject o) { RubyClass cls = o.getMetaClass().getRealClass(); VariableAccessor localAccessor = accessor; if (localAccessor.getClassId() != cls.hashCode()) { localAccessor = cls.getVariableAccessorForWrite(getId()); accessor = localAccessor; } return localAccessor; }
/** * Additional metadata about this method. */ public MethodData getMethodData() { if (methodData == null) { List<String> ivarNames = new ArrayList<>(); InterpreterContext context = ensureInstrsReady(); for (Instr i : context.getInstructions()) { switch (i.getOperation()) { case GET_FIELD: ivarNames.add(((GetFieldInstr) i).getId()); break; case PUT_FIELD: ivarNames.add(((PutFieldInstr) i).getId()); break; } } methodData = new MethodData(method.getId(), method.getFile(), ivarNames); } return methodData; } }
public VariableAccessor getAccessor(IRubyObject o) { RubyClass cls = o.getMetaClass().getRealClass(); VariableAccessor localAccessor = accessor; if (localAccessor.getClassId() != cls.hashCode()) { localAccessor = cls.getVariableAccessorForWrite(getId()); accessor = localAccessor; } return localAccessor; }
@Override public void PutFieldInstr(PutFieldInstr putfieldinstr) { visit(putfieldinstr.getTarget()); visit(putfieldinstr.getValue()); jvmMethod().putField(putfieldinstr.getId()); }
@Override public void PutFieldInstr(PutFieldInstr putfieldinstr) { visit(putfieldinstr.getTarget()); visit(putfieldinstr.getValue()); jvmMethod().putField(putfieldinstr.getId()); }