Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added method schedulePasses() to get a CompilerPassScheduler

  • Loading branch information...
commit f28e85148c9893ee0f257706e1e40b6f8487b4ea 1 parent a6d57b4
@komax authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 core/src/main/java/org/jruby/ir/IRManager.java
View
18 core/src/main/java/org/jruby/ir/IRManager.java
@@ -2,6 +2,7 @@
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.jruby.RubyInstanceConfig;
@@ -10,6 +11,7 @@
import org.jruby.ir.passes.BasicCompilerPassListener;
import org.jruby.ir.passes.CompilerPass;
import org.jruby.ir.passes.CompilerPassListener;
+import org.jruby.ir.passes.CompilerPassScheduler;
/**
*/
@@ -62,6 +64,22 @@ public IRModuleBody getObject() {
return object;
}
+ public CompilerPassScheduler schedulePasses() {
+ CompilerPassScheduler scheduler = new CompilerPassScheduler() {
+ private Iterator<CompilerPass> iterator;
+ {
+ this.iterator = compilerPasses.iterator();
+ }
+
+ @Override
+ public Iterator<CompilerPass> iterator() {
+ return this.iterator;
+ }
+
+ };
+ return scheduler;
+ }
+
public List<CompilerPass> getCompilerPasses(IRScope scope) {
return compilerPasses;
}
Please sign in to comment.
Something went wrong with that request. Please try again.