[webkit-changes] [WebKit/WebKit] f3c296: [WGSL] Validate constant evaluation result
Tadeu Zagallo
noreply at github.com
Mon Nov 6 03:21:03 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f3c296b0b2ce3e55eb1ff4f35449b713c6db6f6a
https://github.com/WebKit/WebKit/commit/f3c296b0b2ce3e55eb1ff4f35449b713c6db6f6a
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-11-06 (Mon, 06 Nov 2023)
Changed paths:
M Source/WebGPU/WGSL/ConstantFunctions.h
M Source/WebGPU/WGSL/TypeCheck.cpp
M Source/WebGPU/WGSL/tests/invalid/division.wgsl
M Source/WebGPU/WGSL/tests/valid/overload.wgsl
Log Message:
-----------
[WGSL] Validate constant evaluation result
https://bugs.webkit.org/show_bug.cgi?id=264182
rdar://117922885
Reviewed by Mike Wyrzykowski.
This is necessary to catch when operations produce values that can't be represented
in their respective type, but it's also helpful to identify issues where the value
representation diverges from the type. There were already a few such cases which had
to be fixed as part of this patch.
* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::UNARY_OPERATION):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::chooseOverload):
* Source/WebGPU/WGSL/tests/invalid/division.wgsl:
* Source/WebGPU/WGSL/tests/valid/overload.wgsl:
Canonical link: https://commits.webkit.org/270261@main
More information about the webkit-changes
mailing list