Code Map
module volt.semantic.util;
//! Turn a [|w|d]char into [ubyte|ushort|uint] type.
fn charToInteger(pt: ir.PrimitiveType) ir.PrimitiveType { }
//! Remove the given types storage modifiers. Only the given type is
//! modified, any sub types are left unchanged. If no modification is made
//! returns the given type. Will do a deep copy if modification is needed.
fn removeStorageFields(t: ir.Type) ir.Type { }
//! Resolves AutoType to the given type.
fn flattenAuto(atype: ir.AutoType, type: ir.Type) ir.Type { }
//! Turn stype into a flag, and attach it to type.
fn flattenOneStorage(stype: ir.StorageType, type: ir.Type, ct: ir.CallableType, ctIndex: size_t) { }
//! Implicitly convert types to bools in conditional statements, or error.
fn implicitlyCastToBool(ctx: Context, exp: ir.Exp) { }
//! Return a array of postfixes from a tree of postfixes, starting with the
//! innermost child.
fn collectPostfixes(postfix: ir.Postfix) ir.Postfix[] { }
//! Get a Store or Type from the child of a pre-proceassed postfix chain.
fn getIfStoreOrTypeExp(exp: ir.Exp, store: ir.Store, type: ir.Type) bool { }
fn propagateStorage(type: ir.Type) { }
//! Given a type, return a type that will have every storage flag that are
//! nested within it, by going into array and pointer bases, etc.
fn accumulateStorage(toType: ir.Type, seed: ir.Type) ir.Type { }
//! This handles implicitly typing null. Generic function used by assign
//! and other functions.
fn handleIfNull(ctx: Context, left: ir.Type, right: ir.Exp) bool { }
fn handleNull(ctx: Context, left: ir.Type, right: ir.Exp, rightType: ir.Type) { }
//! Get the this variable for this function.
fn getThisVarNotNull(n: ir.Node, ctx: Context) ir.Variable { }
fn getThisVarNotNull(n: ir.Node, ctx: Context, func: ir.Function) ir.Variable { }
//! Returns a expression that is the this variable, safely handles nested
//! functions as well.
fn getThisReferenceNotNull(n: ir.Node, ctx: Context, thisVar: ir.Variable) ir.Exp { }
fn addVarArgsVarsIfNeeded(lp: LanguagePass, func: ir.Function) { }
fn expsToTypes(exps: ir.Exp[]) ir.Type[] { }
//! Gets a default value (The .default -- 0, or null, usually) for a given
//! type.
fn getDefaultInit(loc: const(Location), lp: LanguagePass, t: ir.Type) ir.Exp { }
//! Handles ., like 'int.min' and the like.
fn typeLookup(ctx: Context, exp: ir.Exp, type: ir.Type) bool { }
fn ifTypeRefDeRef(t: ir.Type) ir.Type { }
fn getSizeOf(loc: const(Location), lp: LanguagePass, type: ir.Type) ir.AccessExp { }
fn getCommonSubtype(loc: const(Location), types: ir.Type[]) ir.Type { }
//! Given a Node, if it's a Struct or a Union, resolve it.
fn resolveChildStructsAndUnions(lp: LanguagePass, rt: ir.Type) { }
fn stripEnumIfEnum(e: ir.Exp, wasEnum: bool) ir.Exp { }
Turn a [|w|d]char into [ubyte|ushort|uint] type.
Remove the given types storage modifiers. Only the given type is modified, any sub types are left unchanged. If no modification is made returns the given type. Will do a deep copy if modification is needed.
const(const(char)[]) -> const(char)[].
Resolves AutoType to the given type.
Copies the storage from the auto type and returns the result.
Turn stype into a flag, and attach it to type.
Implicitly convert types to bools in conditional statements, or error.
This is the conversion used for the
if
, while
, do
, and for
statements.
Return a array of postfixes from a tree of postfixes, starting with the innermost child.
Get a Store or Type from the child of a pre-proceassed postfix chain.
Given a type, return a type that will have every storage flag that are nested within it, by going into array and pointer bases, etc.
This handles implicitly typing null. Generic function used by assign and other functions.
Get the this variable for this function.
May return the this var field on the nested struct, use getThisReferenceNotNull if you want to safely get a expression pointing to the thisVar.
Never returns null.
Returns a expression that is the this variable, safely handles nested functions as well.
Never returns null.
Gets a default value (The .default -- 0, or null, usually) for a given type.
Handles
Given a Node, if it's a Struct or a Union, resolve it.