Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 454ec9e1ec8c89ed1977b3e149f0533ec77c6097
https://github.com/WebKit/WebKit/commit/454ec9e1ec8c89ed1977b3e149f0533ec77c6097
Author: Tadeu Zagallo <[email protected]>
Date: 2023-10-23 (Mon, 23 Oct 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTCallExpression.h
M Source/WebGPU/WGSL/ConstantFunctions.h
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/Overload.h
M Source/WebGPU/WGSL/TypeCheck.cpp
M Source/WebGPU/WGSL/TypeDeclarations.rb
M Source/WebGPU/WGSL/generator/main.rb
Log Message:
-----------
[WGSL] Add more information to type declarations
https://bugs.webkit.org/show_bug.cgi?id=263550
rdar://117370085
Reviewed by Mike Wyrzykowski.
This patch adds 4 bits of information to the declarations in
TypeDeclarations.rb:
- it makes a distinction between constructors, regular functions and operators
- whether the function is const, and moves the pointer to the constant functions
into the overload entry, so that it no longer needs to be looked up in a
separate
hash map
- the stages in which the declaration is available
- whether the function specifies `@must_use` or not
* Source/WebGPU/WGSL/AST/ASTCallExpression.h:
* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::constantAdd):
(WGSL::constantVec2):
(WGSL::constantVec3):
(WGSL::constantVec4):
(WGSL::constantVector2): Deleted.
(WGSL::constantVector3): Deleted.
(WGSL::constantVector4): Deleted.
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Overload.h:
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::TypeChecker):
(WGSL::TypeChecker::chooseOverload):
* Source/WebGPU/WGSL/TypeDeclarations.rb:
* Source/WebGPU/WGSL/generator/main.rb:
Canonical link: https://commits.webkit.org/269673@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes