Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not put new cloned instrs back into original CFG. WrappedIRClosure is
converted to ClosureInterpreterContext which is not usable by the JIT.

This cloning was done for CFG to match interpreter instr list for accurate
debugging.  A followup commit will clone CFG if debug is enabled so that
we have a contention-free CFG (from JIT) and one which has same instrs
as what the interpreter is interpreting.
  • Loading branch information
enebo committed Oct 16, 2014
1 parent 593ca19 commit 77e15cc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/src/main/java/org/jruby/ir/IRScope.java
Expand Up @@ -472,6 +472,7 @@ protected Instr[] prepareInstructions() {
SimpleCloneInfo cloneInfo = new SimpleCloneInfo(this, false);

// FIXME: If CFG (or linearizedBBList) knew number of instrs we could end up allocing better
// FIXME: Clone CFG in debug mode so interpreter can get matching info to instrs it is interp'ing

// Pass 1. Set up IPCs for labels and instructions and build linear instr list
List<Instr> newInstrs = new ArrayList<>();
Expand All @@ -495,11 +496,6 @@ protected Instr[] prepareInstructions() {
}

newInstr.setIPC(ipc);

// We add back to original CFG so that debug output will match up with what
// we saved to interpreter. This knowledge may get changed if we are interp'ing
// with debug output while JIT is running (FIXME?)
bbInstrs.set(i, newInstr);
newInstrs.add(newInstr);
ipc++;
}
Expand Down

0 comments on commit 77e15cc

Please sign in to comment.