dmd.e2ir

Converts expressions to Intermediate Representation (IR) for the backend.

Members

Functions

addressElem
elem* addressElem(elem* e, Type t, bool alwaysCopy)

Take address of an elem. Accounts for e being an rvalue by assigning the rvalue to a temp.

clearStringTab
void clearStringTab()

Reset stringTab[] between object files being emitted, because the symbols are local.

elAssign
elem* elAssign(elem* e1, elem* e2, Type t, type* tx)

Generate a copy from e2 to e1.

toElem
elem* toElem(Expression e, IRState* irs)

Convert Expression to backend elem.

toElemDtor
elem* toElemDtor(Expression e, IRState* irs)

Convert Expression to elem, then append destructors for any temporaries created in elem.

toStringSymbol
Symbol* toStringSymbol(const(char)* str, size_t len, size_t sz)

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.

toStringSymbol
Symbol* toStringSymbol(StringExp se)

Turn StringExp into Symbol.

toTraceGC
void toTraceGC(IRState* irs, elem* e, Loc loc)

Replace call to GC allocator with call to tracing GC allocator.

type_zeroCopy
bool type_zeroCopy(type* t)

Determine if zero bits need to be copied for this backend type

Meta