@Override public void ToAryInstr(ToAryInstr toaryinstr) { jvmMethod().loadContext(); visit(toaryinstr.getArray()); jvmMethod().invokeIRHelper("irToAry", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class)); jvmStoreLocal(toaryinstr.getResult()); }
@Override public void GetFieldInstr(GetFieldInstr getfieldinstr) { visit(getfieldinstr.getSource()); jvmMethod().getField(getfieldinstr.getId()); jvmStoreLocal(getfieldinstr.getResult()); }
@Override public void ToAryInstr(ToAryInstr toaryinstr) { jvm.method().loadContext(); visit(toaryinstr.getArrayArg()); jvm.method().adapter.ldc(toaryinstr.dontToAryArrays()); jvm.method().invokeHelper("irToAry", IRubyObject.class, ThreadContext.class, IRubyObject.class, boolean.class); jvmStoreLocal(toaryinstr.getResult()); }
@Override public void ToAryInstr(ToAryInstr toaryinstr) { jvmMethod().loadContext(); visit(toaryinstr.getArray()); jvmMethod().invokeIRHelper("irToAry", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class)); jvmStoreLocal(toaryinstr.getResult()); }
@Override public void ToAryInstr(ToAryInstr toaryinstr) { jvm.method().loadContext(); visit(toaryinstr.getArrayArg()); jvm.method().adapter.ldc(toaryinstr.dontToAryArrays()); jvm.method().invokeHelper("irToAry", IRubyObject.class, ThreadContext.class, IRubyObject.class, boolean.class); jvmStoreLocal(toaryinstr.getResult()); }
@Override public void GetFieldInstr(GetFieldInstr getfieldinstr) { visit(getfieldinstr.getSource()); jvmMethod().getField(getfieldinstr.getId()); jvmStoreLocal(getfieldinstr.getResult()); }
@Override public void BlockGivenInstr(BlockGivenInstr blockGivenInstr) { jvmMethod().loadContext(); visit(blockGivenInstr.getBlockArg()); jvmMethod().invokeIRHelper("isBlockGiven", sig(RubyBoolean.class, ThreadContext.class, Object.class)); jvmStoreLocal(blockGivenInstr.getResult()); }
@Override public void ReqdArgMultipleAsgnInstr(ReqdArgMultipleAsgnInstr reqdargmultipleasgninstr) { jvm.method().loadContext(); visit(reqdargmultipleasgninstr.getArrayArg()); jvm.method().adapter.checkcast("org/jruby/RubyArray"); jvm.method().adapter.pushInt(reqdargmultipleasgninstr.getPreArgsCount()); jvm.method().adapter.pushInt(reqdargmultipleasgninstr.getIndex()); jvm.method().adapter.pushInt(reqdargmultipleasgninstr.getPostArgsCount()); jvm.method().invokeHelper("irReqdArgMultipleAsgn", IRubyObject.class, ThreadContext.class, RubyArray.class, int.class, int.class, int.class); jvmStoreLocal(reqdargmultipleasgninstr.getResult()); }
@Override public void ArgScopeDepthInstr(ArgScopeDepthInstr instr) { jvmMethod().loadContext(); jvmMethod().loadStaticScope(); jvmMethod().invokeIRHelper("getArgScopeDepth", sig(RubyFixnum.class, ThreadContext.class, StaticScope.class)); jvmStoreLocal(instr.getResult()); }
@Override public void ReqdArgMultipleAsgnInstr(ReqdArgMultipleAsgnInstr reqdargmultipleasgninstr) { jvm.method().loadContext(); visit(reqdargmultipleasgninstr.getArrayArg()); jvm.method().adapter.checkcast("org/jruby/RubyArray"); jvm.method().adapter.pushInt(reqdargmultipleasgninstr.getPreArgsCount()); jvm.method().adapter.pushInt(reqdargmultipleasgninstr.getIndex()); jvm.method().adapter.pushInt(reqdargmultipleasgninstr.getPostArgsCount()); jvm.method().invokeHelper("irReqdArgMultipleAsgn", IRubyObject.class, ThreadContext.class, RubyArray.class, int.class, int.class, int.class); jvmStoreLocal(reqdargmultipleasgninstr.getResult()); }
@Override public void GetErrorInfoInstr(GetErrorInfoInstr geterrorinfoinstr) { jvmMethod().loadContext(); jvmAdapter().invokevirtual(p(ThreadContext.class), "getErrorInfo", sig(IRubyObject.class)); jvmStoreLocal(geterrorinfoinstr.getResult()); }
@Override public void LoadFrameClosure(LoadFrameClosureInstr loadframeclosureinstr) { jvmMethod().loadContext(); jvmAdapter().invokevirtual(p(ThreadContext.class), "getFrameBlock", sig(Block.class)); jvmStoreLocal(loadframeclosureinstr.getResult()); }
@Override public void RescueEQQInstr(RescueEQQInstr rescueeqqinstr) { jvmMethod().loadContext(); visit(rescueeqqinstr.getArg1()); visit(rescueeqqinstr.getArg2()); jvmMethod().invokeIRHelper("isExceptionHandled", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class, Object.class)); jvmStoreLocal(rescueeqqinstr.getResult()); }
@Override public void BlockGivenInstr(BlockGivenInstr blockGivenInstr) { jvmMethod().loadContext(); visit(blockGivenInstr.getBlockArg()); jvmMethod().invokeIRHelper("isBlockGiven", sig(RubyBoolean.class, ThreadContext.class, Object.class)); jvmStoreLocal(blockGivenInstr.getResult()); }
@Override public void GetErrorInfoInstr(GetErrorInfoInstr geterrorinfoinstr) { jvmMethod().loadContext(); jvmAdapter().invokevirtual(p(ThreadContext.class), "getErrorInfo", sig(IRubyObject.class)); jvmStoreLocal(geterrorinfoinstr.getResult()); }
@Override public void ProcessModuleBodyInstr(ProcessModuleBodyInstr processmodulebodyinstr) { jvmMethod().loadContext(); visit(processmodulebodyinstr.getModuleBody()); visit(processmodulebodyinstr.getBlock()); jvmMethod().invokeIRHelper("invokeModuleBody", sig(IRubyObject.class, ThreadContext.class, DynamicMethod.class, Block.class)); jvmStoreLocal(processmodulebodyinstr.getResult()); }
@Override public void ArgScopeDepthInstr(ArgScopeDepthInstr instr) { jvmMethod().loadContext(); jvmMethod().loadStaticScope(); jvmMethod().invokeIRHelper("getArgScopeDepth", sig(RubyFixnum.class, ThreadContext.class, StaticScope.class)); jvmStoreLocal(instr.getResult()); }
@Override public void LoadFrameClosure(LoadFrameClosureInstr loadframeclosureinstr) { jvmMethod().loadContext(); jvmAdapter().invokevirtual(p(ThreadContext.class), "getFrameBlock", sig(Block.class)); jvmStoreLocal(loadframeclosureinstr.getResult()); }
@Override public void ProcessModuleBodyInstr(ProcessModuleBodyInstr processmodulebodyinstr) { jvmMethod().loadContext(); visit(processmodulebodyinstr.getModuleBody()); visit(processmodulebodyinstr.getBlock()); jvmMethod().invokeIRHelper("invokeModuleBody", sig(IRubyObject.class, ThreadContext.class, DynamicMethod.class, Block.class)); jvmStoreLocal(processmodulebodyinstr.getResult()); }
@Override public void RescueEQQInstr(RescueEQQInstr rescueeqqinstr) { jvmMethod().loadContext(); visit(rescueeqqinstr.getArg1()); visit(rescueeqqinstr.getArg2()); jvmMethod().invokeIRHelper("isExceptionHandled", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class, Object.class)); jvmStoreLocal(rescueeqqinstr.getResult()); }