xfrp/envs

XFRP environments. The environment is actually the combination of four specialized environments with several additional data about the program.

See also:

Types

XfrpEnv = tuple[name: XfrpModuleId, materials: XfrpMaterials, opEnv: XfrpOpEnv,
                funcEnv: XfrpFuncEnv, nodeEnv: XfrpNodeEnv, tyEnv: XfrpTypeEnv,
                emits: StringTableRef, flags: set[CompilerFlag]]
An environment.   Source Edit

Procs

proc makeEnvironment(materials: XfrpMaterials; flags: set[CompilerFlag] = {}): XfrpEnv {...}{.raises: [
    KeyError, XfrpDefinitionError, XfrpReferenceError, XfrpSyntaxError,
    XfrpTypeError], tags: [].}
Construct new environment from materials.   Source Edit
proc getVarType(env: XfrpEnv; id: XfrpNodeId): XfrpType {...}{.raises: [KeyError],
    tags: [].}
  Source Edit
proc getFuncType(env: XfrpEnv; id: XfrpFuncId): XfrpFuncType {...}{.
    raises: [KeyError], tags: [].}
  Source Edit
proc getOperator(env: XfrpEnv; id: XfrpOpId): XfrpOpDescription {...}{.
    raises: [KeyError], tags: [].}
  Source Edit
proc getFunction(env: XfrpEnv; id: XfrpFuncId): XfrpFuncDescription {...}{.
    raises: [KeyError], tags: [].}
  Source Edit
proc getNode(env: XfrpEnv; id: XfrpNodeId): XfrpNodeDescription {...}{.
    raises: [KeyError], tags: [].}
  Source Edit
proc plusIdAndTypes(env: XfrpEnv; idAndTypes: seq[XfrpIdAndType]): XfrpEnv {...}{.
    raises: [], tags: [].}
  Source Edit
proc xfrpTypeOf(env: XfrpEnv; exp: WithCodeInfo[XfrpExpr]; definedIn = env.name): XfrpType {...}{.
    raises: [XfrpTypeError, KeyError, XfrpReferenceError], tags: [].}
  Source Edit
proc findOpId(env: XfrpEnv; op: XfrpOperator; termTypes: seq[XfrpType];
              definedIn: XfrpModuleId): XfrpOpId {...}{.
    raises: [KeyError, XfrpLanguageError], tags: [].}
  Source Edit
proc findFuncId(env: XfrpEnv; id: XfrpId; definedIn: XfrpModuleId): XfrpFuncId {...}{.
    raises: [KeyError, XfrpLanguageError], tags: [].}
  Source Edit

Funcs

func maxNodeDelay(env: XfrpEnv): int {...}{.raises: [], tags: [].}
  Source Edit

Iterators

iterator operatorIds(env: XfrpEnv): XfrpOpId {...}{.raises: [], tags: [].}
  Source Edit
iterator functionIds(env: XfrpEnv): XfrpFuncId {...}{.raises: [], tags: [].}
  Source Edit
iterator nodeIds(env: XfrpEnv): XfrpNodeId {...}{.raises: [], tags: [].}
  Source Edit
iterator innerNodeIds(env: XfrpEnv): XfrpNodeId {...}{.raises: [], tags: [].}
  Source Edit
iterator inputNodeIds(env: XfrpEnv): XfrpNodeId {...}{.raises: [], tags: [].}
  Source Edit
iterator outputNodeIds(env: XfrpEnv): XfrpNodeId {...}{.raises: [], tags: [].}
  Source Edit
iterator initNodesOfDelay(env: XfrpEnv; delay: int): XfrpNodeId {...}{.
    raises: [KeyError], tags: [].}
  Source Edit