-
Notifications
You must be signed in to change notification settings - Fork 747
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
[NFC] Use SubtypingDiscoverer in StringLowering #6325
Conversation
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.
This is a clear improvement over the previous hacks, but it's still not complete because it only handles the case of ref.null
instructions and not other sources of string bottom types that could appear in practice, such as local.get
s of locals holding string nulls. Do you plan to make this correct in more cases proactively or just as they come up in practice?
Interesting, I guess that's a possible problem: Overall I wasn't intending to do proactive work here as it isn't clear how important this pass is for our users. |
We could, I suppose, add a |
This replaces horrible hacks to find which nulls need to switch (from none to noext) with general code using SubtypingDiscoverer. That helper is aware of where each expression is written, so we can find those nulls trivially. This is NFC on existing usage but should fix any remaining bugs with null constants.
This replaces horrible hacks to find which nulls need to switch (from none to
noext) with general code using
SubtypingDiscoverer
. That helper is aware ofwhere each expression is written, so we can find those nulls trivially.
This is NFC on existing usage but should fix any remaining bugs in that area.
It is also shorter code.