[webkit-changes] [WebKit/WebKit] 7e29ff: [WGSL] Convert AST into string representation
Dan Glastonbury
noreply at github.com
Thu Oct 20 19:06:10 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7e29ffc25c726581465a62874ef92ff8ea7bfabc
https://github.com/WebKit/WebKit/commit/7e29ffc25c726581465a62874ef92ff8ea7bfabc
Author: Dan Glastonbury <djg at apple.com>
Date: 2022-10-20 (Thu, 20 Oct 2022)
Changed paths:
A Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
A Source/WebGPU/WGSL/AST/ASTStringDumper.h
M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
M Source/WebGPU/WGSL/AST/ASTVisitor.h
M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WGSL/ASTStringDumperTests.cpp
M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp
A Tools/TestWebKitAPI/Tests/WGSL/TestWGSLAPI.cpp
A Tools/TestWebKitAPI/Tests/WGSL/TestWGSLAPI.h
Log Message:
-----------
[WGSL] Convert AST into string representation
https://bugs.webkit.org/show_bug.cgi?id=246791
rdar://problem/101366942
Reviewed by Myles C. Maxfield.
As a debugging aid, AST::Dumper converts a given WGSL AST into a string
representation that approximates the original WGSL source code.
Tested by ASTDumperTests.
* Source/WebGPU/WGSL/AST/ASTDumper.cpp: Added.
(WGSL::AST::Indent::Indent):
(WGSL::AST::bumpIndent):
(WGSL::AST::Dumper::visitVector):
(WGSL::AST::Dumper::toString):
(WGSL::AST::Dumper::visit):
(WGSL::AST::dumpNode):
(WGSL::AST::dumpAST):
* Source/WebGPU/WGSL/AST/ASTDumper.h: Added.
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
(WGSL::AST::Visitor::visit):
* Source/WebGPU/WGSL/AST/ASTVisitor.h:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WGSL/ASTDumperTests.cpp: Added.
(TestWGSLAPI::toString):
(TestWGSLAPI::TEST):
* Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp:
(logCompilationError): Deleted.
* Tools/TestWebKitAPI/Tests/WGSL/TestWGSLAPI.cpp: Added.
(TestWGSLAPI::logCompilationError):
* Tools/TestWebKitAPI/Tests/WGSL/TestWGSLAPI.h: Added.
Canonical link: https://commits.webkit.org/255812@main
More information about the webkit-changes
mailing list