nz.net.juju.jaune.peep
Class PeepholeOptimiser

java.lang.Object
  |
  +--nz.net.juju.jaune.peep.PeepholeOptimiser

public class PeepholeOptimiser
extends java.lang.Object

A simple, fast peephole optimiser that works by tokenising the peephole rules and input lines, running all of the rules, and then recombining the output. The speed comes from a good tokeniser and significantly easier rule matching due to being able to compare tokens.


Constructor Summary
PeepholeOptimiser(PeepholeRule[] rules)
          Create a new peephole optimiser around this set of peephole rules.
 
Method Summary
 java.util.List optimise(java.util.List lines)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeepholeOptimiser

public PeepholeOptimiser(PeepholeRule[] rules)
Create a new peephole optimiser around this set of peephole rules.
Method Detail

optimise

public java.util.List optimise(java.util.List lines)