Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Library Reference

version 2.110.0

overview

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 usinga local clone.

dmd.e2ir

Converts expressions to Intermediate Representation (IR) for the backend.
Authors:
Walter Bright
License:
Boost License 1.0

Sourcee2ir.d

Documentationhttps://dlang.org/phobos/dmd_e2ir.html

Coveragehttps://codecov.io/gh/dlang/dmd/src/master/src/dmd/e2ir.d

boolISX64REF(Declarationvar);
If variable var is a value that will actually be passed as a reference
Parameters:
Declarationvarparameter variable
Returns:
true if actually implicitly passed by reference
elem*elAssign(elem*e1, elem*e2, Typet, type*tx);
Generate a copy from e2 to e1.
Parameters:
elem*e1lvalue
elem*e2rvalue
Typetvalue type
type*txif !null, then t converted to C type
Returns:
generated elem
booltype_zeroCopy(type*t);
Determine if zero bits need to be copied for this backend type
Parameters:
type*tbackend type
Returns:
true if 0 bits
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
Returns:
Symbol
Symbol*toStringSymbol(StringExpse);
Turn StringExp into Symbol.
voidtoTraceGC(ref IRStateirs, elem*e, const ref Locloc);
Replace call to GC allocator with call to tracing GC allocator.
Parameters:
IRStateirsto get function from
elem*eelem to modify in place
Loclocto get file/line from
elem*toElemDtor(Expressione, ref IRStateirs);
Convert Expression to elem, then append destructors for any temporaries created in elem.
Parameters:
ExpressioneExpression to convert
IRStateirscontext
Returns:
generated elem tree
elem*addressElem(elem*e, Typet, boolalwaysCopy = false);
Take address of an elem. Accounts for e being an rvalue by assigning the rvalue to a temp.
Parameters:
elem*eelem to take address of
TypetType of elem
boolalwaysCopywhen true, always copy e to a tmp
Returns:
the equivalent of &e
voidclearStringTab();
Reset stringTab[] between object files being emitted, because the symbols are local.
boolisDllImported(Dsymbolvar);
Figure out whether a data symbol should be dllimported
Parameters:
Dsymbolvardeclaration of the symbol
Returns:
true if symbol should be imported from a DLL
Symbol*toExtSymbol(Dsymbols);
Generate a backend symbol for a frontend symbol
Parameters:
Dsymbolsfrontend symbol
Returns:
the backend symbol or the associated symbol in the import table if it is expected to be imported from a DLL
elem*toElem(Expressione, ref IRStateirs);
Convert Expression to backend elem.
Parameters:
Expressioneexpression tree
IRStateirscontext
Returns:
backend elem tree
Copyright © 1999-2025 by theD Language Foundation | Page generated byDdoc on Thu Mar 27 23:09:41 2025

[8]ページ先頭

©2009-2025 Movatter.jp