Skip to content

Commit 4558515

Browse files
committed
Improve name-mangling rationale text
1 parent 09947c7 commit 4558515

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

design/mvp/CanonicalABI.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,9 +1318,10 @@ for all m : core:module and ct : componenttype:
13181318
One consequence of this is that the canonical `core:moduletype` must encode
13191319
enough high-level type information for `lift-canonical-module` to be able to
13201320
reconstruct a working component. This is achieved using [name mangling]. Unlike
1321-
traditional C-family name mangling, which uses unreadable, space-efficient
1322-
mangling schemes to support millions of *internal* names, the Canonical ABI
1323-
only needs to mangle *external* names, of which there will only be a handful.
1321+
traditional C-family name mangling, which have a limited character set imposed
1322+
by linkers and aim to be space-efficient enough to support millions of
1323+
*internal* names, the Canonical ABI can use any valid UTF-8 string and only
1324+
needs to mangle *external* names, of which there will only be a handful.
13241325
Therefore, squeezing out every byte is a lower concern and so, for simplicity
13251326
and readability, type information is mangled using a subset of the
13261327
[`wit`](WIT.md) syntax.

0 commit comments

Comments
 (0)