This module implements lifting for type-bound operations (=sink, =, =destroy, =deepCopy).
Procs
proc produceDestructorForDiscriminator(g: ModuleGraph; typ: PType; field: PSym; info: TLineInfo): PSym {...}{. raises: [Exception, ValueError, IOError, ERecoverableError], tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
- Source Edit
proc createTypeBoundOps(g: ModuleGraph; c: PContext; orig: PType; info: TLineInfo) {...}{. raises: [Exception, ValueError, IOError, ERecoverableError], tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
- In the semantic pass this is called in strategic places to ensure we lift assignment, destructors and moves properly. The later 'injectdestructors' pass depends on it. Source Edit