Skip to content

Commit

Permalink
Do not promote interpreted blocks to full builds unless -X-C
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Mar 7, 2015
1 parent 3c1cd3b commit 214f545
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.jruby.EvalType;
import org.jruby.Ruby;
import org.jruby.RubyInstanceConfig;
import org.jruby.RubyModule;
import org.jruby.compiler.FullBuildSource;
import org.jruby.ir.IRClosure;
Expand Down Expand Up @@ -29,6 +30,12 @@ public InterpretedIRBlockBody(IRClosure closure, Signature signature) {
this.closure = closure;
this.pushScope = true;
this.reuseParentScope = false;

// 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() != RubyInstanceConfig.CompileMode.OFF) {
callCount = -1;
}
}

@Override
Expand Down

0 comments on commit 214f545

Please sign in to comment.