IMCC needs to be separated from libparrot. Not all programs want or need IMCC, and it forces libparrot to make some really messy assumptions.

Bytecode Tasks

  • Be able to generate .pbc files from an executing Parrot application
  • Figure out if loading .pbc files takes more time than loading .pir files and, if so, why. Fix it (prefer to make .pbc file loading faster as opposed to making .pir file loading slower)

PIR compreg Task

  • Create a new, standard compiler interface (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 op can do
  • Change the load_bytecode op (or create a replacement) that ONLY loads bytecode. The op should never automatically compile/load a PIR/PASM file (#1885)


  • Update PackFile PMCs to know about opmaps
  • Update PackFile PMCs to add a .write_file method (or whatever we want to call it). This should write the contents of a PackFile to a properly formed and functional .pbc file
  • Update PackFile PMC to be able to return a hash of Subs by name
  • Update PackFile PMC to be able to return an ordered list of :main subs
  • Deprecate and remove Eval PMC. Replace all uses of it with PackFile PMCs

Final Tasks

  • Separate IMCC from libparrot. IMCC should be compiled into it's own stand-alone dynamic library
  • update src/main.c to link to libparrot and the new IMCC library
  • Make sure IMCC can be loaded using a "load_language 'PIR'" call, or similar
  • Move the new IMCC library out of the Parrot repository