// main routine
worklist.add(new Instantiation(null, mainSubroutine));
// Emit instantiations of each subroutine we encounter, including the
// main subroutine
InsnList newInstructions = new InsnList();
List newTryCatchBlocks = new ArrayList();
List newLocalVariables = new ArrayList();
while (!worklist.isEmpty()) {
Instantiation inst = (Instantiation) worklist.removeFirst();
emitSubroutine(inst, worklist, newInstructions, newTryCatchBlocks, newLocalVariables);