private SizeableList < WAMInstruction > optimize ( List < WAMInstruction > instructions ) { StateMachine optimizeConstants = new OptimizeInstructions ( symbolTable , interner ) ; Iterable < WAMInstruction > matcher = new Matcher < WAMInstruction , WAMInstruction > ( instructions . iterator ( ) , optimizeConstants ) ; SizeableList < WAMInstruction > result = new SizeableLinkedList < WAMInstruction > ( ) ; for ( WAMInstruction instruction : matcher ) { result . add ( instruction ) ; } return result ; }
Performs an optimization pass for specialized instructions .