Skip to content

Commit

Permalink
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -1020,13 +1020,16 @@ public void resetState() {

// Invalidate compiler pass state.
//
// SSS FIXME: This is to get around concurrent-modification issues
// since CompilerPass.invalidate modifies this, but some passes
// cannot be invalidated.
int i = 0;
while (i < getFullInterpreterContext().getExecutedPasses().size()) {
if (!getFullInterpreterContext().getExecutedPasses().get(i).invalidate(this)) {
i++;
// SSS FIXME: Re-grabbing passes each iter is to get around concurrent-modification issues
// since CompilerPass.invalidate modifies this, but some passes cannot be invalidated. This
// should be wrapped in an iterator.
FullInterpreterContext fic = getFullInterpreterContext();
if (fic != null) {
int i = 0;
while (i < fic.getExecutedPasses().size()) {
if (!fic.getExecutedPasses().get(i).invalidate(this)) {
i++;
}
}
}
}

0 comments on commit 72da265

Please sign in to comment.