[webkit-changes] [WebKit/WebKit] 56d070: [WGSL] Implement compound assignment parsing and c...

Dan Glastonbury noreply at github.com
Fri Apr 21 18:22:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 56d070db0af61f3d8381f64e5f9b9c60003e821f
      https://github.com/WebKit/WebKit/commit/56d070db0af61f3d8381f64e5f9b9c60003e821f
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2023-04-21 (Fri, 21 Apr 2023)

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
    M Source/WebGPU/WGSL/AST/ASTStringDumper.h
    M Source/WebGPU/WGSL/Lexer.cpp
    M Source/WebGPU/WGSL/Parser.cpp
    M Source/WebGPU/WGSL/Token.cpp
    M Source/WebGPU/WGSL/Token.h
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/valid/overload.wgsl
    M Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp

  Log Message:
  -----------
  [WGSL] Implement compound assignment parsing and code gen
https://bugs.webkit.org/show_bug.cgi?id=255754
rdar://problem/108347694

Reviewed by Tadeu Zagallo.

Implement parsing and code gen for compound assignment statements (eg. "x +=
1"). Doesn't implement type checking, which will be implemented in a follow up patch.

* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::canContinueCompoundAssignmentStatement):
(WGSL::toBinaryOperation):
(WGSL::Parser<Lexer>::parseStatement):
* Source/WebGPU/WGSL/Token.cpp:
(WGSL::toString):
* Source/WebGPU/WGSL/Token.h:
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/valid/overload.wgsl:
* Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp:
(TestWGSLAPI::TEST):

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




More information about the webkit-changes mailing list