-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] Increase size of type variable id field to 20 bits #25666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently `id` field is only 12 bits long which is a lot smaller than `graph index` which is 28 bits and creates problems with large collections of literals since `id` is going to overflow pretty quickly (4096 elements max). Let's change it so both fields have the same 20 bits which is big enough. Resolves: [SR-10914](https://bugs.swift.org/browse/SR-10914) Resolves: rdar://problem/51616307
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@swift-ci please test |
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please smoke test |
This change makes the TypeVariableType bitfield very sensitive to TypeBase bitfield experiments. Can we add a comment suggesting what one should do? Perhaps dial back the graph index to 19? If that's the advice, can we just automate it? For example:
|
See #25818 |
Currently
id
field is only 12 bits long which is a lot smallerthan
graph index
which is 28 bits and creates problems withlarge collections of literals since
id
is going to overflowpretty quickly (4096 elements max). Let's change it so both
fields have the same 20 bits which is big enough.
Resolves: SR-10914
Resolves: rdar://problem/51616307