Changes between Version 1 and Version 2 of Lorito
- Timestamp:
- 11/17/09 06:25:22 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Lorito
v1 v2 3 3 === Opcodes === 4 4 5 Lorito is a sequence of opcodes which can be trivially converted to jit instructions.5 Lorito is implemented as a fixed set of low-level opcodes in 3-argument form which can be trivially converted to jit instructions. All other ops (PIR, dynops, etc) are implemented in terms of these Lorito ops. Once Lorito is implemented, much of Parrot's core code can be rewritten in something that gets compiled down to Lorito. 6 6 7 7 ==== Pro ==== 8 8 * easy to convert to JIT instructions 9 9 * easy to provide runtime code generation 10 * whole-program optimization is possible for all subsystems written in Lorito - cotto 11 * such ops would be easier to translate into C for non-jit-capable systems or builds - cotto 12 * security privileges can be implemented on a per-opcode basis, in case we ever get around to that - cotto 13 * bytecode validation is simpler - cotto 10 14 11 15 ==== Con ==== … … 13 17 * likely inspired by features/mindsets provided by supported JITs 14 18 * if the set of supported JITs is large, ops will cater to the lowest common denominator 15 * if LLVM is the only supported JIT (initial plan), ops will mirror LLVM ops, and likely be difficult to work with to support other JIT systems 19 * Counterpoint: This is an issue of API design. If we understand the non-essential capabilities we want to support (e.g. optimization passes, etc), we can design the API so that such capabilities can be exploited but not required. - cotto 20 * if LLVM is the only supported JIT (initial plan), ops will tend to mirror LLVM ops, and likely be difficult to work with to support other JIT systems 21 * Counterpoint: This is an implementation detail. Once we start designing and implementing Lorito, some of us can familiarize ourselves with other JIT systems to ensure that Lorito can also support them. - cotto 16 22 * writing the entire VM in low-level ops is not desirable from both readability and writability perspectives. Most of the VM will be opaque to the JIT, which is bad for inlining. 17 23 * requiring people to write ops at all will create a pressure to add abstractions 24 * Counterpoint: We don't want most people to write Lorito code directly. We *want* those abstractions so that most of Parrot can be written in PIR, NQP or even a low-runtime HLL, since it'll all compile down to Lorito ops. - cotto 18 25 19 26 === CLang === … … 31 38 === Structured === 32 39 33 The code defining important portions (potentially all, but at least in common hot-paths), including all code that does runtime code generation is defined in a new, structured language, defined specif cally for the purpose. Supported execution strategies (C, various JIT systems, etc) are implemented as backends to the compiler.40 The code defining important portions (potentially all, but at least in common hot-paths), including all code that does runtime code generation is defined in a new, structured language, defined specifically for the purpose. Supported execution strategies (C, various JIT systems, etc) are implemented as backends to the compiler. 34 41 35 42 ==== Probable language features ====