~/projects/jruby $ jruby -Xjit.threshold=0 -Xjit.logging=true -e 'load "./format.rb"'
2014-10-20T09:32:55.175-05:00: Ruby: done compiling target script: -e
2014-10-20T09:32:55.245-05:00: JITCompiler: Could not compile; passes run: [org.jruby.ir.passes.OptimizeTempVarsPass@96737c1e, org.jruby.ir.passes.LocalOptimizationPass@584ed071, org.jruby.ir.passes.AddLocalVarLoadStoreInstructions@f8c40f9d, org.jruby.ir.passes.AddCallProtocolInstructions@87f2d916, org.jruby.ir.passes.EnsureTempsAssigned@cf6bb568]:Date.Date.Date at /Users/headius/projects/jruby/format.rb:3 because of: "Too many arguments in method signature in class file Users/headius/projects/jruby/format"
Compiler.java:66:in `__file__': java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
...
Caused by:
NativeMethodAccessorImpl.java:-2:in `invoke0': java.lang.reflect.InvocationTargetException
...
Caused by:
IRRuntimeHelpers.java:694:in `findInstanceMethodContainer': java.lang.RuntimeException: Should not get here! scopeType is SCRIPT_BODY
from DefineInstanceMethodInstr.java:57:in `interpret'
from Interpreter.java:508:in `processOtherOp'
from Interpreter.java:598:in `interpret'
from Interpreter.java:677:in `INTERPRET_METHOD'
from InterpretedIRMethod.java:95:in `call'
from ProcessModuleBodyInstr.java:73:in `interpret'
from Interpreter.java:508:in `processOtherOp'
from Interpreter.java:598:in `interpret'
from Interpreter.java:643:in `INTERPRET_ROOT'
from IRScriptBody.java:114:in `interpret'
from Interpreter.java:135:in `execute'
from Interpreter.java:27:in `execute'
from IRTranslator.java:43:in `execute'
from Ruby.java:820:in `runInterpreter'
from Ruby.java:2842:in `loadFile'
...
This has been fixed through various changes, like keeping interpreted instructions from having JIT passes applied. We still have issues with too-big methods not JITing, but that's a different issue.
This file attempts to JIT (with threshold=0) but fails and falls back to interpreter. However, the interpreter now fails after JIT has run.
Here's the code: https://gist.github.com/headius/6ef51542253cc3f0b786
Whether the JIT fails or not, the interpreter should still always be able to run the IR.
The text was updated successfully, but these errors were encountered: