Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7e62fd17e02ba347563d489dff70655596299b60
https://github.com/WebKit/WebKit/commit/7e62fd17e02ba347563d489dff70655596299b60
Author: Tadeu Zagallo <[email protected]>
Date: 2023-04-21 (Fri, 21 Apr 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTForStatement.h
M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
M Source/WebGPU/WGSL/AST/ASTStringDumper.h
M Source/WebGPU/WGSL/Lexer.cpp
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/ParserPrivate.h
M Source/WebGPU/WGSL/Token.cpp
M Source/WebGPU/WGSL/Token.h
M Source/WebGPU/WGSL/TypeCheck.cpp
A Source/WebGPU/WGSL/tests/invalid/for.wgsl
A Source/WebGPU/WGSL/tests/valid/for.wgsl
M Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp
Log Message:
-----------
[WGSL] Implement for-loop
https://bugs.webkit.org/show_bug.cgi?id=255723
rdar://108317255
Reviewed by Mike Wyrzykowski.
Add parsing, type checking and codegen for for-loops. For now, we still don't
support the full syntax for the initialization and update clauses.
* Source/WebGPU/WGSL/AST/ASTForStatement.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseStatement):
(WGSL::Parser<Lexer>::parseForStatement):
* Source/WebGPU/WGSL/ParserPrivate.h:
* Source/WebGPU/WGSL/Token.cpp:
(WGSL::toString):
* Source/WebGPU/WGSL/Token.h:
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/invalid/for.wgsl: Added.
* Source/WebGPU/WGSL/tests/valid/for.wgsl: Added.
Canonical link: https://commits.webkit.org/263233@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes