Version 2 (modified by whiteknight, 3 years ago)

redo this page, Add handling of :load/:init. We should be able to tell the compiler to trigger one or the other. Remove literal list of method names, reduce to a list of concepts.

Functionality that a general compiler should have. Some of these methods might not be implemented on a case-by-case basis:

  • The ability to compile a file to a PackFile (String name in, Packfile PMC out)
  • The ability to compile a string to a PackFile

We should probably be able to pass flags to some or all of these methods to control executing certain types of functions:

  • Whether or not we trigger :load or :init functions. Parrot automatically triggers :load functions when it loads in a .pbc file, but we may also want the compiler to trigger these instead of :init, the default
  • Whether or not we should automatically trigger :main (Typically: When loaded as a program, yes. When loaded as a library, no)