This module contains:
- routines duplicated from elsewhere and adjusted to work with CgNode instead of PNode
- routines for translating PNode to CgNode
- utility routines for CgNode of which usage should either be phased out or that should be moved somewhere else
The plan is to eventually replace all usages of the routines part of #1 and #2 with something else (e.g., by running analysis in an earlier phase, lowering earlier, etc.) and then to phase all of them out.
Procs
func callLen(n: CgNode): int {.inline, ...raises: [], tags: [].}
- The number of sub-nodes in a call-like node, excluding the trailing jump target description. Source Edit
func getCalleeMagic(env: MirEnv; callee: CgNode): TMagic {.inline, ...raises: [], tags: [].}
- Source Edit
proc getOrdValue(n: CgNode): Int128 {....raises: [], tags: [].}
- Source Edit
proc isDeepConstExpr(n: CgNode): bool {....raises: [], tags: [].}
- Source Edit
proc isDiscriminantField(n: CgNode): bool {....raises: [], tags: [].}
- Source Edit
func isOfBranch(n: CgNode): bool {.inline, ...raises: [], tags: [].}
- Source Edit
proc newSymNode(env: MirEnv; s: PSym): CgNode {.inline, ...raises: [KeyError], tags: [].}
- Source Edit
func numArgs(n: CgNode): int {.inline, ...raises: [], tags: [].}
- Returns the number of arguments for a call-like node. The callee is excluded. Source Edit
proc pick[T](n: CgNode; forInt, forFloat: T): T
- Returns either forInt or forFloat depending on the type of n. Source Edit