docs: private void emitCode() {
          LinkedList<Instantiation> worklist = new LinkedList<Instantiation>();
          // Create an instantiation of the "root" subroutine, which is just the
          // main routine
          worklist.add(new Instantiation(null, mainSubroutine));
  
          // Emit instantiations of each subroutine we encounter, including the
          // main subroutine
          InsnList newInstructions = new InsnList();
          List<TryCatchBlockNode> newTryCatchBlocks = new ArrayList<TryCatchBlockNode>();
          List<LocalVariableNode> newLocalVariables = new ArrayList<LocalVariableNode>();
          while (!worklist.isEmpty()) {
              Instantiation inst = worklist.removeFirst();
              emitSubroutine(inst, worklist, newInstructions, newTryCatchBlocks,
                      newLocalVariables);
          }
          instructions = newInstructions;
          tryCatchBlocks = newTryCatchBlocks;
          localVariables = newLocalVariables;
      }