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] Add support for increment and decrement statements #14339

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented May 25, 2023

dd11610

[WGSL] Add support for increment and decrement statements
https://bugs.webkit.org/show_bug.cgi?id=257315
rdar://109823828

Reviewed by Mike Wyrzykowski.

Add support for `x++` and `x--` statements

* Source/WebGPU/WGSL/AST/ASTDecrementIncrementStatement.cpp: Copied from Source/WebGPU/WGSL/AST/ASTDecrementIncrementStatement.h.
(WGSL::AST::printInternal):
* Source/WebGPU/WGSL/AST/ASTDecrementIncrementStatement.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseStatement):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/invalid/references.wgsl:
* Source/WebGPU/WGSL/tests/valid/references.wgsl:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

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

f8edc9b

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
βœ… πŸ§ͺ ios-wk2-wpt   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@tadeuzagallo tadeuzagallo self-assigned this May 25, 2023
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label May 25, 2023
@tadeuzagallo tadeuzagallo changed the title [WGSL] [WGSL] Add support for increment and decrement statements May 25, 2023
Copy link
Contributor

@mwyrzykowski mwyrzykowski left a comment

Choose a reason for hiding this comment

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

Approval for the top commit, my assumption is the others will merge prior to this one

@tadeuzagallo tadeuzagallo force-pushed the eng/WGSL-Add-support-for-increment-and-decrement-statements branch from 5e50fc5 to f8edc9b Compare May 26, 2023 09:06
@tadeuzagallo tadeuzagallo added the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
https://bugs.webkit.org/show_bug.cgi?id=257315
rdar://109823828

Reviewed by Mike Wyrzykowski.

Add support for `x++` and `x--` statements

* Source/WebGPU/WGSL/AST/ASTDecrementIncrementStatement.cpp: Copied from Source/WebGPU/WGSL/AST/ASTDecrementIncrementStatement.h.
(WGSL::AST::printInternal):
* Source/WebGPU/WGSL/AST/ASTDecrementIncrementStatement.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseStatement):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/invalid/references.wgsl:
* Source/WebGPU/WGSL/tests/valid/references.wgsl:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/264575@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-Add-support-for-increment-and-decrement-statements branch from f8edc9b to dd11610 Compare May 26, 2023 10:09
@webkit-commit-queue
Copy link
Collaborator

Committed 264575@main (dd11610): https://commits.webkit.org/264575@main

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

@webkit-commit-queue webkit-commit-queue merged commit dd11610 into WebKit:main May 26, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
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