W3cubDocs

/D

ddmd.e2ir

Compiler implementation of the D programming language.

Authors:
Walter Bright
License:
Boost License 1.0
Source:
e2ir.d
elem* addressElem(elem* e, Type t, bool alwaysCopy = false)

Take address of an elem.

elem* array_toPtr(Type t, elem* e)

Convert array to a pointer to the data.

elem* array_toDarray(Type t, elem* e)

Convert array to a dynamic array.

elem* sarray_toDarray(Loc loc, Type tfrom, Type tto, elem* e)
elem* getTypeInfo(Type t, IRState* irs)
StructDeclaration needsPostblit(Type t)

Determine if t is a struct that has postblit.

StructDeclaration needsDtor(Type t)

Determine if t is a struct that has destructor.

void clearStringTab()

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

elem* fillHole(Symbol* stmp, size_t* poffset, size_t offset2, size_t maxoff)

Generate elem to zero fill contents of Symbol stmp from *poffset..offset2. May store anywhere from 0..maxoff, as this function tries to use aligned int stores whereever possible. Update *poffset to end of initialized hole; *poffset will be >= offset2.

elem* appendDtors(IRState* irs, elem* er, size_t starti, size_t endi)

Add destructors

elem* toElemDtor(Expression e, IRState* irs)

Evaluate Expression, then call destructors on any temporaries in it.

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.

Parameters:
const(char)* str string
size_t len number of code units in string
size_t sz number of bytes per code unit
comdat emit string in its own comdat (default is read-only segment). Comdats are useful when linker does not coalesce redundant strings.
Returns:
Symbol
Symbol* toStringSymbol(StringExp se)

Turn StringExp into Symbol.

elem* filelinefunction(IRState* irs, Loc* loc)

Return an elem that is the file, line, and function suitable for insertion into the parameter list.

elem* buildArrayBoundsError(IRState* irs, ref const Loc loc)

Construct elem to run when an array bounds check fails.

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

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

Parameters:
IRState* irs to get function from
elem* e elem to modify
eloc to get file/line from
elem* callCAssert(IRState* irs, Loc loc, Expression exp, Expression emsg, const(char)* str)

Generate call to C's assert failure function. One of exp, emsg, or str must not be null.

Parameters:
IRState* irs context
Loc loc location to use for assert message
Expression exp if not null expression to test (not evaluated, but converted to a string)
Expression emsg if not null then informative message to be computed at run time
const(char)* str if not null then informative message string
Returns:
generated call

© 1999–2017 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/ddmd_e2ir.html