compiler/backend/mangling

  Source   Edit

Implements the "name mangling" used by the code generators. Name mangling needs to make sure that:

  • the resulting identifier is valid according to the target's rules
  • different entities get different names

Procs

proc computeTypeName(g: ModuleGraph; env: TypeEnv; typ: TypeId): string {.
    ...raises: [Exception], tags: [RootEffect].}
Computes the name to address the type with in the generated code. Mangled names are always prefixed with an underscore.   Source   Edit