silt icon indicating copy to clipboard operation
silt copied to clipboard

Implement Mangling of GraphIR Terms

Open CodaFi opened this issue 7 years ago • 4 comments

Part of #99: We must mangle the full module name into the name of a term as well as normalize Arbitrary Unicode Garbage in symbol names. The GIRWriter can then be updated to account for this.

CodaFi avatar Mar 05 '18 04:03 CodaFi

We should never need to mangle the type of a declaration into the symbol (I suspect we can figure this out at runtime from the type metadata)

CodaFi avatar Mar 05 '18 04:03 CodaFi

What about specialized functions?

harlanhaskins avatar Mar 05 '18 04:03 harlanhaskins

We can mangle the fact that we specialized parameters, but I think specializations will be internal to the calling module so we can come up with any old naming scheme.

CodaFi avatar Mar 05 '18 04:03 CodaFi

If we do this, we should implement demangling in the runtime, for debugging and crash tracing purposes.

harlanhaskins avatar Mar 07 '18 04:03 harlanhaskins