[webkit-changes] [WebKit/WebKit] 2c35d9: [WGSL] ParameterizedTypeName should accept more th...
Tadeu Zagallo
noreply at github.com
Tue Sep 5 05:57:29 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2c35d98f86379a837977f1fe99d5e0956c04dce2
https://github.com/WebKit/WebKit/commit/2c35d98f86379a837977f1fe99d5e0956c04dce2
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-09-05 (Tue, 05 Sep 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
M Source/WebGPU/WGSL/AST/ASTTypeName.h
M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/TypeCheck.cpp
M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp
Log Message:
-----------
[WGSL] ParameterizedTypeName should accept more than 1 argument
https://bugs.webkit.org/show_bug.cgi?id=260851
rdar://114617257
Reviewed by Dan Glastonbury.
Currently we fail to parse types such as `texture_storage_2d<f, a>` because we assume
that all parameterized types will only have a single argument. This change is not sufficient
on its own to fix all the parsing issues, as the parameters aren't types, but values, but that
will be implemented in a subsequent patch.
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTTypeName.h:
(WGSL::AST::ParameterizedTypeName::arguments):
(WGSL::AST::ParameterizedTypeName::ParameterizedTypeName):
(WGSL::AST::ParameterizedTypeName::elementType): Deleted.
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
(WGSL::AST::Visitor::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseTypeNameAfterIdentifier):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
(WGSL::TypeChecker::allocateSimpleConstructor):
Canonical link: https://commits.webkit.org/267624@main
More information about the webkit-changes
mailing list