[webkit-changes] [WebKit/WebKit] 0d2521: [WGSL] Add missing Texture entries to the AST dumping

Tadeu Zagallo noreply at github.com
Mon Mar 27 06:56:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0d25214798937779c36c96b86b359221ca451deb
      https://github.com/WebKit/WebKit/commit/0d25214798937779c36c96b86b359221ca451deb
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
    M Source/WebGPU/WGSL/AST/ASTTypeName.h

  Log Message:
  -----------
  [WGSL] Add missing Texture entries to the AST dumping
https://bugs.webkit.org/show_bug.cgi?id=254421
rdar://107186502

Reviewed by Myles C. Maxfield.

In https://commits.webkit.org/262063@main we added support for Textures in the compiler,
which required adding extra entries to ParameterizedTypeName::Base, but I missed adding
the same entries to ASTStringDuper. To avoid running into the same problem in the future
I moved the toString logic next to the enum definition and used an explicit switch, that
way the compiler will warns us about unhandled entries.

* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTTypeName.h:
(WGSL::AST::ParameterizedTypeName::baseToString):

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




More information about the webkit-changes mailing list