Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bd06994b39e7f44c2cfa133a9507459c34e34c61
https://github.com/WebKit/WebKit/commit/bd06994b39e7f44c2cfa133a9507459c34e34c61
Author: Tim Chevalier <[email protected]>
Date: 2023-03-21 (Tue, 21 Mar 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
Log Message:
-----------
[Wasm-GC] Use correct result type for casts in Air
https://bugs.webkit.org/show_bug.cgi?id=254178
Reviewed by Justin Michaud.
The `casts.js` test contains a function that returns the result of a cast
to `none` and has the result type `nullref`. Although this causes a runtime
error,
when Air generates code for this function, it emits a move for the return value
into a `nullref`-typed temp, which causes an assertion failure because the
cast expression was annotated with the type of the expression being cast, not
the result type of the cast. Changed it to create a new temp with the result
type of the cast and emit the move without a type check.
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::addRefCast):
(JSC::Wasm::ExpressionType>::addRefTest):
(JSC::Wasm::ExpressionType>::emitRefTestOrCast):
Canonical link: https://commits.webkit.org/261935@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes