View source code
Display the source code in dmd/backend/elem.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.backend.elem

Routines to handle elems.

Compiler implementation of the D programming language.

Functions

NameDescription
el_alignsize(e)
el_allbits(e, bit) Determine if constant e is all ones or all zeros.
el_alloctmp(ty) Allocate a temporary, and return temporary elem.
el_anydef(ed, e) Does any definition of lvalue ed appear in e?
el_appears(e, s) Does symbol s appear in tree e?
el_bint(op, t, e1, e2) Make a binary operator node.
el_calloc() Allocate an element.
el_combine(e1, e2) Combine e1 and e2 with a comma-expression. Be careful about either or both being null.
el_combines(args, length) Do an array of parameters as a balanced binary tree.
el_const(ty, pconst) Make a constant elem. ty = type of elem *pconst = union of constant data
el_convert(e) Run through a tree converting it to CODGEN.
el_convfloat(e) Convert floating point constant to a read-only symbol. Needed iff floating point code can't load immediate constants.
el_convstring(e) Convert reference to a string to reference to a symbol stored in the static data segment.
el_convxmm(e) Convert vector constant to a read-only symbol. Needed iff vector code can't load immediate constants.
el_copy(to, from) Copy an element (not the tree!).
el_copytotmp(pe) Thin wrapper of exp2_copytotemp. Different from el_same, always makes a temporary.
el_copytree(e) Create and return a duplicate of e, including its leaves. No CSEs.
el_countCommas(e) Count number of commas in the expression.
el_ctor_dtor(ec, ed, pedtor) Create constructor/destructor pair of elems.
el_depends(ea, eb)
el_dtor(edtor, e) Insert destructor information into tree. edtor pointer to object being destructed e code to do the destruction
el_free(e) Free element
el_funcsideeff(e)
el_init() Initialize el package.
el_isdependent(e) Is elem type-dependent or value-dependent?
el_longt(t, val) Make a constant node out of integral type.
el_match(n1, n2)
el_match2(n1, n2) Kludge on el_match(). Same, but ignore differences in OPconst.
el_match3(n1, n2) Kludge on el_match(). Same, but ignore differences in type modifiers.
el_match4(n1, n2) Kludge on el_match(). Same, but ignore differences in spelling of var's.
el_match5(n1, n2) Kludge on el_match(). Same, but regard signed/unsigned as equivalent.
el_nparams(e) Return a list of the parameters.
el_opArray(parray, e, op) Fill an array with the ops.
el_opCombine(args, length, op, ty) Do an array of parameters as a tree
el_opN(e, op) Return number of op nodes
el_pair(tym, lo, hi) Create a quad word out of two dwords.
el_param(e1, e2) Combine e1 and e2 as parameters to a function. Be careful about either or both being null.
el_paramArray(parray, e) Fill an array with the parameters.
el_params(e1) Create parameter list, terminated by a null.
el_params(args, length) Do an array of parameters as a balanced binary tree.
el_parent(e, pe) Find and return pointer to parent of e starting at pe. Return null if can't find it.
el_reset() Initialize for another run through.
el_returns(e) Determine if expression may return. Does not detect all cases, errs on the side of saying it returns.
el_same(pe) Similar to el_copytree(e). But if e has any side effects, it's replaced with (tmp = e) and tmp is returned.
el_scancommas(pe) Scan down commas and return the controlling elem. Extra layer of indirection so we can update (*ret)
el_selecte1(e) Select the e1 child of e.
el_selecte2(e) Select the e2 child of e.
el_settype(e, t) Set new type for elem.
el_sideeffect(e)
el_signx32(e) Determine if constant e is a 32 bit or less value, or is a 32 bit value sign extended to 64 bits.
el_term() Terminate el package.
el_toldouble(e) Extract long double value from constant elem. Silently ignore types which are not floating point values.
el_tolong(e) Extract long value from constant elem.
el_tolongt(e) Extract long value from constant parser elem.
el_typesize(t) Create elem that is the size of a type.
el_unat(op, t, e1) Make a unary operator node.
el_vectorConst(ty, val) Create a const integer vector elem
el_zero(t) Create an elem of the constant 0, of the type t.
elem_print(e, nestlevel) Write out expression elem.
ERTOL(e)
exp2_copytotemp(e) Replace (e) with ((stmp = e),stmp)
shrinkLongDoubleConstantIfPossible(e) If e is a long double constant, and it is perfectly representable as a double constant, convert it to a double constant. Note that this must NOT be done in contexts where there are no further operations, since then it could change the type (eg, in the function call printf("%La", 2.0L); the 2.0 must stay as a long double).

Structs

NameDescription
STAB

Authors

Walter Bright

License

Boost License 1.0