Skip to content

Commit

Permalink
Showing 7 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ public Object execute(IRScope scope, Object... data) {

// FIXME: Useless for now
// Run on all nested closures.
for (IRClosure c: scope.getClosures()) execute(c);
for (IRClosure c: scope.getClosures()) run(c, false, true);

// LVA information is no longer valid after the pass
// FIXME: Grrr ... this seems broken to have to create a new object to invalidate
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ public Object execute(IRScope s, Object... data) {
// Run on all nested closures.
//
// In the current implementation, nested scopes are processed independently (unlike Live Variable Analysis)
for (IRClosure c: s.getClosures()) execute(c);
for (IRClosure c: s.getClosures()) run(c, false, true);

// LVA information is no longer valid after this pass
// FIXME: Grrr ... this seems broken to have to create a new object to invalidate
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ public Object execute(IRScope scope, Object... data) {
((LiveVariablesProblem) data[0]).markDeadInstructions();

for (IRClosure cl: scope.getClosures()) {
run(cl, true);
run(cl, false, true);
}

return true;
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ private void processCFG(CFG cfg) {

// recurse
for (IRScope childScope : cfg.getScope().getClosures()) {
processCFG(childScope.cfg());
run(childScope, false, true);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jruby.ir.passes;

import org.jruby.ir.IRClosure;
import org.jruby.ir.IREvalScript;
import org.jruby.ir.IRFlags;
import org.jruby.ir.IRScope;
import org.jruby.ir.instructions.ClosureAcceptingInstr;
@@ -15,7 +14,6 @@
import org.jruby.ir.dataflow.analyses.LiveVariablesProblem;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.List;
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public List<Class<? extends CompilerPass>> getDependencies() {
public Object execute(IRScope s, Object... data) {
// This let us compute execute scope flags for a method based on what all nested closures do
for (IRClosure c: s.getClosures()) {
run(c, true);
run(c, false, true);
}

for (BasicBlock b: ((CFG) data[0]).getBasicBlocks()) {
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public String getLabel() {
@Override
public Object execute(IRScope s, Object... data) {
for (IRClosure c: s.getClosures()) {
run(c, true);
run(c, false, true);
}

optimizeTmpVars(s);

0 comments on commit d3aabe2

Please sign in to comment.