[webkit-changes] [WebKit/WebKit] bbf722: [WGSL] Validate variable declarations

Tadeu Zagallo noreply at github.com
Thu Jan 25 10:08:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bbf7224ca0edd26f16133946978a64999c99cbfc
      https://github.com/WebKit/WebKit/commit/bbf7224ca0edd26f16133946978a64999c99cbfc
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebGPU/WGSL/Parser.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/valid/attributes.wgsl
    M Source/WebGPU/WGSL/tests/valid/constants.wgsl

  Log Message:
  -----------
  [WGSL] Validate variable declarations
https://bugs.webkit.org/show_bug.cgi?id=268013
rdar://121435952

Reviewed by Mike Wyrzykowski.

Add validation for variable declaration according to the spec [1]. This checks
that varibles have the correct attributes, variable initialization, etc.

[1]: https://www.w3.org/TR/WGSL/#var-and-value

* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseVariableQualifier):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visitVariable):

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




More information about the webkit-changes mailing list