Most of the expression to llvmbitcode generation code is in this module.
Code Map
//! Most of the expression to llvmbitcode generation code is in this
//! module.
module volt.llvm.expression;
//! Returns the value, without doing any checking if it is in reference
//! form or not.
fn getValueAnyForm(state: State, exp: ir.Exp, result: Value) { }
Returns the value, without doing any checking if it is in reference form or not.
Sets up values and calls helper functions to handle BinOp, will leave debug info location set on builder.
Helper function that does the bin operation, sets debug info location on builder and will not unset it.
Pointer artithmetic, caller have to flip left and right. Assumes debug info location already set.
Primitive artithmetic, assumes debug info location already set.
Handle primitive casts, the value to cast is stored in result already.
Handle pointer casts. This is really easy. Also casts between function pointers and pointers.
Handle pointer <-> integer casts.
Handle all Array casts as bit casts
Handles bitwise not, the ~ operator.
Handles '*' dereferences.
Handles '&' referencing.
Get an LLVMValueRef from a constant string, known at compile time.
Write the EnumMembers builtin.
Gets the value for the expressions and makes sure that it is a struct reference value. Will handle pointers to structs correctly, setting isPointer to true and dereferencing the type pointer to the actual StructType.
Get the value pair needed to call or create a delegate.
If the given value isPointer is set build a load function.
Ensures that the given Value is a pointer by allocating temp storage for it.
Ensures that the given Value is a pointer by allocating temp storage for it.