Crate debris_llir
source ·Expand description
Low-level intermediate representation
The llir is quite close to minecraft functions.
Modules
- This module defines classes. The concept of a class should be similar to the equivalent concept in other languages. Every value (
object
) has a class. Builtin values have a class with an associated type, while user defined classes, like structs, carry a reference to the concrete struct. - This module contains a trait
ToFunctionInterface
which allows to write nice function interfaces by using much less boilerplate to define functions. - (Current incomplete) interface for minecraft’s text commands.
- Contains every node that can be produced in the llir step.
- memory 🔒
- Contains all objects which can be used in a debris program.
- opt 🔒Contains two optimizer that can operate on the llir: The peephole optimizer which optimizes every emitted node on its own (but is also able to look at previous nodes) and the global optimizer
- runtime 🔒
- types 🔒
Macros
- Helper macro that makes match-style semantics available for duck typed objects
Structs
- tracks statistics about the global code which can be used to allow some optimizations
- Objects are a central type for the compiler. Basically anything that can be assigned to a variable is an object. This includes numbers, function, modules, and more. It is possible to cast the
ObjectPayload
to its original value. BecauseDebrisObject
is unsized, it generally only accessed asObjectRef
- The low-level intermediate representation struct
- This struct is used to pass objects around
Enums
- The type of a class object
Traits
- A trait for values that can be used as debris object payload
Type Aliases
- The type of the properties map