Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.pre2
-
Fix Version/s: JRuby 1.7.0.RC1
-
Component/s: Embedding
-
Labels:None
-
Environment:jruby 1.7.0.preview2 (1.9.3p203) 2012-08-10 82eb396 on Java HotSpot(TM) 64-Bit Server VM 1.6.0_33-b03-424-11M3720 [darwin-x86_64]
Also verified on Ruboto.
-
Testcase included:yes
-
Number of attachments :
Description
I have some questions:
Firstly, what should the default value for compile mode be when using the ScriptingContainer? I would expect this to be the same as when running JRuby in other ways, that is JIT. It currently defaults to OFF.
More importantly, the system property jruby.compile.mode is not respected when set to OFFIR, and I think it should.
Failing test:
@Test
public void testSetCompileModeBySystemPropertyOFFIR() {
System.setProperty("jruby.compile.mode", "OFFIR");
ScriptingContainer instance = new ScriptingContainer(LocalContextScope.THREADSAFE);
instance.put("MEANING", 42);
instance.runScriptlet("puts MEANING");
assertEquals(CompileMode.OFFIR, instance.getCompileMode());
}
I'd like to fix this. Please advise if it is a good idea.
Lastly, what is the setting if you want to use IR JIT? The settings for compile mode I can find are JIT, FORCE, FORCEIR, OFF, OFFIR. What about JITIR?
All info is appreciated.
I think the property to set compile/jit mode are only read once, and may be static. This complicates making them configurable.
I'll look into improving the config APIs relating to this so we can at least get it to be configurable after boot time.