Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
15 changed files
with
179 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.