Skip to content
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

[WGSL] CompoundStatement should introduce a new scope #12006

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented Mar 27, 2023

d463a81

[WGSL] CompoundStatement should introduce a new scope
https://bugs.webkit.org/show_bug.cgi?id=254523
rdar://107267001

Reviewed by Myles C. Maxfield.

Two sibling CompooundStatements (blocks) should have their own scopes, and therefore
be able to introduce variables with the same name.
This patch also includes a test file, which depends on PR #11995 to be executed,
and for now can only be executed manually.

* Source/WebGPU/WGSL/MangleNames.cpp:
(WGSL::NameManglerVisitor::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visitFunctionBody):
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/valid/scope.wgsl: Added.

Canonical link: https://commits.webkit.org/262197@main

2d46adb

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@tadeuzagallo tadeuzagallo self-assigned this Mar 27, 2023
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label Mar 27, 2023
Copy link
Contributor

@litherum litherum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ†’

@tadeuzagallo tadeuzagallo added the merge-queue Applied to send a pull request to merge-queue label Mar 28, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 262197@main (d463a81): https://commits.webkit.org/262197@main

Reviewed commits have been landed. Closing PR #12006 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 28, 2023
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-CompoundStatement-should-introduce-a-new-scope branch from 2d46adb to d463a81 Compare March 28, 2023 07:24
@webkit-commit-queue webkit-commit-queue merged commit d463a81 into WebKit:main Mar 28, 2023
@tadeuzagallo tadeuzagallo deleted the eng/WGSL-CompoundStatement-should-introduce-a-new-scope branch May 17, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
4 participants