Changes between Version 1 and Version 2 of CompilerInterfaceDesign

Show
Ignore:
Timestamp:
12/09/10 20:05:27 (11 years ago)
Author:
whiteknight
Comment:

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.

Legend:

Unmodified
Added
Removed
Modified
  • CompilerInterfaceDesign

    v1 v2  
    1 Methods that a compiler object should have: 
     1Functionality that a general compiler should have. Some of these methods might not be implemented on a case-by-case basis: 
    22 
    3  - compile_string 
    4  - compile_file 
    5  - eval_string 
    6  - eval_file 
    7  - eval_line (compile/execute a single line in a shared context like a REPL) 
     3 - The ability to compile a file to a PackFile (String name in, Packfile PMC out) 
     4 - The ability to compile a string to a PackFile 
    85 
     6We should probably be able to pass flags to some or all of these methods to control executing certain types of functions: 
     7 
     8 - 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 
     9 - Whether or not we should automatically trigger :main (Typically: When loaded as a program, yes. When loaded as a library, no) 
     10