Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 42a17170e18f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 49b54856f6bb
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Jun 7, 2016

  1. Unbreak debug IR output

    subbuss committed Jun 7, 2016
    Copy the full SHA
    cca22ee View commit details
  2. Add missing inits to end of BB + re-enable AddMissingInitsPass

    * Required inits for lvars were being added before the binding
      for the scope had been pushed. This is what you get when you
      blindly copy code (from EnsureTempsAssigned) without thinking. :)
    subbuss committed Jun 7, 2016
    Copy the full SHA
    49b5485 View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRManager.java
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
public class IRManager {
public static final String SAFE_COMPILER_PASSES = "";
public static final String DEFAULT_BUILD_PASSES = "";
public static final String DEFAULT_JIT_PASSES = "LocalOptimizationPass,DeadCodeElimination,OptimizeDynScopesPass,OptimizeDelegationPass,AddCallProtocolInstructions,EnsureTempsAssigned";
public static final String DEFAULT_JIT_PASSES = "LocalOptimizationPass,DeadCodeElimination,OptimizeDynScopesPass,OptimizeDelegationPass,AddCallProtocolInstructions,AddMissingInitsPass";
public static final String DEFAULT_INLINING_COMPILER_PASSES = "LocalOptimizationPass";

private final CompilerPass deadCodeEliminationPass = new DeadCodeElimination();
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel

Operation operation = instr.getOperation();
if (debug) {
Interpreter.LOG.info("I: {" + ipc + "} ", instr);
Interpreter.LOG.info("I: {" + ipc + "} " + instr);
Interpreter.interpInstrsCount++;
}

Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel

Operation operation = instr.getOperation();
if (debug) {
Interpreter.LOG.info("I: {" + ipc + "} ", instr);
Interpreter.LOG.info("I: {" + ipc + "} " + instr);
Interpreter.interpInstrsCount++;
} else if (profile) {
Profiler.instrTick(operation);
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel

Operation operation = instr.getOperation();
if (debug) {
Interpreter.LOG.info("I: {" + ipc + "} ", instr + "; <#RPCs=" + (rescuePCs == null ? 0 : rescuePCs.size()) + ">");
Interpreter.LOG.info("I: {" + ipc + "} " + instr + "; <#RPCs=" + (rescuePCs == null ? 0 : rescuePCs.size()) + ">");
Interpreter.interpInstrsCount++;
} else if (profile) {
Profiler.instrTick(operation);
Original file line number Diff line number Diff line change
@@ -28,15 +28,14 @@ public Object execute(IRScope scope, Object... data) {

// Add inits to entry
BasicBlock bb = scope.getCFG().getEntryBB();
int i = 0;
Variable first = null;
for (Variable v : undefinedVars) {
// System.out.println("Adding missing init for " + v + " in " + scope);
if (first == null) {
bb.getInstrs().add(i++, new CopyInstr(v, new Nil()));
bb.getInstrs().add(new CopyInstr(v, new Nil()));
first = v;
} else {
bb.getInstrs().add(i++, new CopyInstr(v, first));
bb.getInstrs().add(new CopyInstr(v, first));
}
}