jruby/jruby — pull request #917 by komax (2013-07-25 12:22:29+00:00)
Title: Scheduler for controlling the Execution of IR Passes

After a discussion with @enebo and @subbuss, I propose a new simple interface for controlling the execution of IR passes. Explanation:
* it is just an `Iterable`, as every configuration of IR passes is a directed acyclic graph (starting on IR and ending up in (optimized) IR)
* If a IR pass requires to run after another pass (dependency), this must be modeled as an edge
* There cannot be cycles, since this means to have unresolvable dependencies on passes
* Hence, there must be a topological sort for each allowed execution configuration of IR passes
* This is modeled as `Iterable` interface in `CompilerPassScheduler`

In future, there are maybe more features required to linearize and resolve the dependencies on IR passes. However, this simple interface should then be extended by more sophisticated features and then iterate in the end on the Scheduler.