You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the 'G' mangling to include generic parameters from
all levels of nested nominal types, and not just the innermost.
Note that the raw mangling syntax is something like this for
a nested type 'A<Int>.B<String>':
- bound_generic
- struct 'B'
- struct 'A'
- module 'M'
- args
- Int
- args
- String
However, the actual mangling tree is more along the lines of:
- bound_generic_struct 'B'
- bound_generic_struct 'A'
- module 'M'
- args
- Int
- args
- String
This arrangement improves the quality of substitutions (we are
more likely to have a substitution for the entire unbound
generic type name 'A.B' around), and simplifies a few other
details.
Unfortunately, the remangling logic becomes slightly grotesque.
A simple SILGen test for nested generics exercises the mangling,
and ensures that Sema and SILGen do not crash with nested generics.
More detailed SILGen tests, as well as IRGen support for nested
generics is next.
0 commit comments