View source code
Display the source code in dmd/toir.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.toir
Compiler implementation of the D programming language.
Documentation
https://dlang.org/phobos/dmd_toir.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/src/dmd/toir.d
Functions
Name | Description |
---|---|
buildCapture(fd)
|
build a debug info struct for variables captured by nested functions, but not in a closure. must be called after generating the function to fill stack offsets |
buildClosure(fd, irs)
|
Closures are implemented by taking the local variables that need to survive the scope of the function, and copying them into a gc allocated chuck of memory. That chunk, called the closure here, is inserted into the linked list of stack frames instead of the usual stack frame. |
getEthis(loc, irs, fd)
|
Return elem that evaluates to the static frame pointer for function fd. If fd is a member function, the returned expression will compute the value of fd's 'this' variable. This routine is critical for implementing nested functions. |
getParentClosureType(sthis, fd)
|
for a nested function 'fd' return the type of the closure of an outer function or aggregate. If the function is a member function the 'this' type is expected to be stored in 'sthis.Sthis'. It is always returned if it is not a void pointer. buildClosure() must have been called on the outer function before. |
incUsageElem(irs, loc)
|
Produce elem which increments the usage count for a particular line.
Sets corresponding bit in bitmap m .
Used to implement -cov switch (coverage analysis).
|
intrinsic_op(fd)
|
Convert intrinsic function to operator. |
resolveLengthVar(lengthVar, pe, t1)
|
Given an expression e that is an array, determine and set the 'length' variable. |
retStyle(tf, needsThis)
|
Determine return style of function - whether in registers or through a hidden pointer to the caller's stack. |
setClosureVarOffset(fd)
|
Go through the variables in function fd that are to be allocated in a closure, and set the .offset fields for those variables to their positions relative to the start of the closure instance. Also turns off nrvo for closure variables. |
setEthis(loc, irs, ey, ad)
|
Initialize the hidden aggregate member, vthis, with the context pointer. |
Authors
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.