Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jruby.internal.runtime.methods;

import org.jruby.Ruby;
import org.jruby.RubyInstanceConfig;
import org.jruby.RubyModule;
import org.jruby.compiler.Compilable;
import org.jruby.ir.IRMethod;
@@ -41,9 +42,8 @@ public InterpretedIRMethod(IRScope method, Visibility visibility, RubyModule imp
this.method.getStaticScope().determineModule();
this.signature = getStaticScope().getSignature();

if (!method.getManager().getInstanceConfig().getCompileMode().shouldJIT()) {
callCount = -1;
}
// -1 jit.threshold is way of having interpreter not promote full builds.
if (Options.JIT_THRESHOLD.load() == -1) callCount = -1;
}

public IRScope getIRScope() {
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public InterpretedIRBlockBody(IRClosure closure, Signature signature) {

// JIT currently JITs blocks along with their method and no on-demand by themselves. We only
// promote to full build here if we are -X-C.
if (closure.getManager().getInstanceConfig().getCompileMode().shouldJIT()) {
if (closure.getManager().getInstanceConfig().getCompileMode().shouldJIT() || Options.JIT_THRESHOLD.load() == -1) {
callCount = -1;
}
}

0 comments on commit e6a26e3

Please sign in to comment.