Tasklist: IMCC

Whiteknight edited this page May 9, 2012 · 1 revision

This page details all the necessary improvements to the Intermediate Code Compiler (IMCC) that need to be made. If you work on any of these tasks, make sure you remove it from the list when you're done.

Bytecode Tasks

  • Be able to generate .pbc files from a running Parrot application.
  • Figure out if loading .pbc files takes more time than loading .pir files and, if so, why. Modify this to make .pbc file loading faster as opposed to making .pir file loading slower.

PIR compreg Task

  • Create a new, standard compiler interface (i.e. does compiler) that HLL compilers should conform to for maximum interoperability.
  • Update the PIR and PASM compreg objects to conform to the new interface.
  • Register the PIR and PASM compreg objects through appropriate API interfaces.
  • Update the PIR compreg so that it can do everything the current load_bytecode opcode can do.
  • Change the load_bytecode opcode (or create a replacement) that only loads bytecode. The opcode should never automatically compile and load a .pir or .pasm file (see TT #1885).


  • Modify the PackFile PMC's so that they know about opmaps.
  • Add a write_file() method to the PackFile PMC that will write the contents of a PackFile to a properly formed and functional .pbc file.
  • Modify the PackFile PMC so that it can return a hash of Sub's by name.
  • Modify the PackFile PMC so that it can return an ordered list of :main subroutines.
  • Deprecate and remove the Eval PMC. Replace all uses of it with the PackFile PMC.

Final Tasks

  • Separate IMCC from libparrot. IMCC should be compiled into it's own dynamic library called libimcc.
  • Update src/main.c to link to libparrot and the new IMCC library.
  • Make sure IMCC can be loaded using the load_language opcode.
  • Move the new IMCC library out of the Parrot repository.