-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[wgsl-in] Implement template list discovery and handle all type resolution in the lowerer #8386
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
base: trunk
Are you sure you want to change the base?
Conversation
…ble_updating_statement`
also fixes spans in some cases
9c99aa1 to
d4b4df4
Compare
|
I can take review here - I've been looking into this for a long time. |
| Token::End => "end".to_string(), | ||
| }, | ||
| ExpectedToken::Identifier => "identifier".to_string(), | ||
| ExpectedToken::LhsExpression => "lhs_expression".to_string(), |
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.
I think lhs_expression is spec jargon. Isn't there something we could say here that would be more readily recognized by WGSL programmers? "expression to be assigned to"? "destination for assignment"?
(Spec jargon is fine when we need to be precise and there's nothing better.)
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.
"destination for assignment"/"assignment destination" sound good.
It's also used by increment/decrement statements but it's probably ok?
|
So far I've reviewed the following commits and they all look fine: |
84846b1 to
5f4abe6
Compare
|
I removed the last commit that was adding a CTS test since it wasn't passing due to unrelated reasons and pushed 2 more commits to fix the issues CI surfaced. |
They could but that would be lots of separate PRs to file and orchestrate since I think some of them depend on others. I could open a PR just with the refactor commits but then this PR would need to depend on that new one. Let me know. |
Connections
Resolves #4501.
Resolves #4406.
Resolves #4405.
Description
Almost all commits prior to
implement template list discoveryare refactors to get the frontend to look more similar to the spec and to make the needed changes easier to implement (most notably making theTokenizerno longer implClone).The template list discovery implementation differs from the spec only in structure (not in behavior) since we can do it lazily after tokenization.
The last 3 substantial commits move all type resolution to the lowerer since all identifiers that are part of types need to be resolved the same as all other identifiers.
Testing
Changed existing tests and added new ones.
Squash or Rebase?
Rebase.