dmd.e2ir
Converts expressions to Intermediate Representation (IR) for the backend.
License
Source: e2ir.d
Documentation: https://dlang.org/phobos/dmd_e2ir.html
-
Declaration
elem*elAssign(elem*e1, elem*e2, Typet, type*tx);Generate a copy from
e2toe1.Parameters
elem*e1lvalue
elem*e2rvalue
Typetvalue type
type*txif !
null, thentconverted to C typeReturn Value
generated elem
-
Declaration
booltype_zeroCopy(type*t);Determine if zero bits need to be copied for this backend type
Parameters
type*tbackend type
Return Value
trueif 0 bits -
Declaration
Symbol*toStringSymbol(const(char)*str, size_tlen, size_tsz);Write read-only string to object file, create a local symbol for it. Makes a copy of
str's contents, does not keep a reference to it.Parameters
const(char)*strstring
size_tlennumber of code units in string
size_tsznumber of bytes per code unit
Return Value
Symbol
-
Declaration
Symbol*toStringSymbol(StringExpse);Turn StringExp into Symbol.
-
Declaration
voidtoTraceGC(IRState*irs, elem*e, const ref Locloc);Replace call to GC allocator with call to tracing GC allocator.
Parameters
IRState*irsto get function from
elem*eelem to modify in place
Loclocto get file/line from
-
Declaration
elem*toElemDtor(Expressione, IRState*irs);Convert Expression to elem, then append destructors for any temporaries created in elem.
Parameters
ExpressioneExpression to convert
IRState*irscontext
Return Value
generated elem tree
-
Declaration
elem*addressElem(elem*e, Typet, boolalwaysCopy= false);Take address of an elem. Accounts for
ebeing an rvalue by assigning the rvalue to a temp.Parameters
elem*eelem to take address of
TypetType of elem
boolalwaysCopywhen
true, always copyeto a tmpReturn Value
the equivalent of &
e -
Declaration
voidclearStringTab();Reset stringTab[] between object files being emitted, because the symbols are local.
-
Declaration
elem*toElem(Expressione, IRState*irs);Convert Expression to backend elem.
Parameters
Expressioneexpression tree
IRState*irscontext
Return Value
backend elem tree