Intermediate Language

The Intermediate Language is an intermediate representation (IR) that is designed as a platform-independent version of machine code that can be emitted by other languages in the system. Storm then takes care of transforming the emitted IR into machine code that can be executed natively by the processor in the current process. As such, the intermediate language is low-level and generally not type-safe, even though it operates at a higher level compared to machine code or assembly language.

Since the Intermediate Language is designed as a compilation target for other languages, it has no formal textual representation that can be compiled by the system. It is, of course, possible to create such a representation (even as a library), but this has not been done as it is typically more convenient to write code i Basic Storm, or other higher level languages. Since it is not possible to load code in the Intermediate Language, it is implemented in the package core.asm, rather than in lang.

Since there is no formal textual representation for the IR, this part of the manual will use the representation used when pretty-printing the IR to discuss its semantics. It will also occasionally use Basic Storm to illustrate how IR is emitted from other languages.

The remainder of this part of the manual consists of the following sections: