Changes between Version 1 and Version 2 of CompilerInterfaceDesign
- Timestamp:
- 12/09/10 20:05:27 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CompilerInterfaceDesign
v1 v2 1 Methods that a compiler object should have:1 Functionality that a general compiler should have. Some of these methods might not be implemented on a case-by-case basis: 2 2 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 8 5 6 We 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