[webkit-changes] [WebKit/WebKit] 8b4319: [WGSL] Use UniqueRefVector to simplify working wit...
Dan Glastonbury
noreply at github.com
Sat Oct 15 18:15:55 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8b4319ba38ad79d0a796d5e1c0dab1efd8a1616d
https://github.com/WebKit/WebKit/commit/8b4319ba38ad79d0a796d5e1c0dab1efd8a1616d
Author: Dan Glastonbury <djg at apple.com>
Date: 2022-10-15 (Sat, 15 Oct 2022)
Changed paths:
M Source/WebGPU/WGSL/AST/Attribute.h
M Source/WebGPU/WGSL/AST/Decl.h
M Source/WebGPU/WGSL/AST/Expression.h
M Source/WebGPU/WGSL/AST/Expressions/ArrayAccess.h
M Source/WebGPU/WGSL/AST/Expressions/CallableExpression.h
M Source/WebGPU/WGSL/AST/FunctionDecl.h
M Source/WebGPU/WGSL/AST/GlobalDirective.h
M Source/WebGPU/WGSL/AST/ShaderModule.h
M Source/WebGPU/WGSL/AST/Statement.h
M Source/WebGPU/WGSL/AST/Statements/CompoundStatement.h
M Source/WebGPU/WGSL/AST/StructureDecl.h
M Source/WebGPU/WGSL/AST/VariableDecl.h
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/ParserPrivate.h
M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp
Log Message:
-----------
[WGSL] Use UniqueRefVector to simplify working with AST
https://bugs.webkit.org/show_bug.cgi?id=246560
rdar://problem/101198284
Reviewed by Dean Jackson.
Use UniqueRefVector for lists of AST nodes to eliminate the need to unwrap
UniqueRef<> with .get().
Tested by TestWebKitAPI/Tests/WGSL/ParserTests.cpp
* Source/WebGPU/WGSL/AST/Attribute.h:
* Source/WebGPU/WGSL/AST/Decl.h:
(WGSL::AST::Decl::~Decl):
* Source/WebGPU/WGSL/AST/Expression.h:
* Source/WebGPU/WGSL/AST/Expressions/ArrayAccess.h:
* Source/WebGPU/WGSL/AST/Expressions/CallableExpression.h:
* Source/WebGPU/WGSL/AST/FunctionDecl.h:
* Source/WebGPU/WGSL/AST/GlobalDirective.h:
* Source/WebGPU/WGSL/AST/ShaderModule.h:
* Source/WebGPU/WGSL/AST/Statement.h:
* Source/WebGPU/WGSL/AST/Statements/CompoundStatement.h:
* Source/WebGPU/WGSL/AST/StructureDecl.h:
* Source/WebGPU/WGSL/AST/VariableDecl.h:
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseShader):
(WGSL::Parser<Lexer>::parseAttributes):
(WGSL::Parser<Lexer>::parseStructDecl):
(WGSL::Parser<Lexer>::parseVariableDecl):
(WGSL::Parser<Lexer>::parseVariableDeclWithAttributes):
(WGSL::Parser<Lexer>::parseFunctionDecl):
(WGSL::Parser<Lexer>::parseStatement):
(WGSL::Parser<Lexer>::parseCompoundStatement):
(WGSL::Parser<Lexer>::parseArgumentExpressionList):
* Source/WebGPU/WGSL/ParserPrivate.h:
* Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp:
(TestWGSLAPI::TEST):
Canonical link: https://commits.webkit.org/255597@main
More information about the webkit-changes
mailing list