Compiler Frontends

The MOSA Compiler Framework is agnostic to the source of its intermediate representation. The compiler framework should be able to handle various sources of its code, such as .NET CIL, Java byte code or other P-Code Machine.

.NET CIL compilation related stages

Compiling CIL with the compiler framework requires the first three stages of the compilation pipeline to be the CilDecodingStage, BasicBlockBuildingStage and CilToIrTransformationStage. The first stage performs the decoding of CIL code into an CIL intermediate representation, the BasicBlockBuildingStage transforms the linear instruction stream into one based on basic blocks. Finally the CilToIrTransformationStage transforms the high-level CIL opcodes into a lower level IR representation, which is closer to a real machine than the high level CIL opcodes.

Java byte code compilation stages

Right now there's no compiler frontend related to compiling Java byte code. If you want to start developing one, contact the MOSA compiler team for support and coordination.

Other source languages

Technically the compilation framework should handle any source language, which is not translated into native machine code. It should even be possible to compile directly from source code to native code with the appropriate compilation stages, which do source code parsing and the other stages required to transform source code into the intermediate representation of the MOSA compiler framework.

Last edited Nov 21, 2008 at 5:24 AM by tgiphil, version 1

Comments

No comments yet.