Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0fe8046298bfa55e1bee68a844d5033e181f5ada
https://github.com/WebKit/WebKit/commit/0fe8046298bfa55e1bee68a844d5033e181f5ada
Author: Asumu Takikawa <[email protected]>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M JSTests/wasm/gc/casts.js
A JSTests/wasm/gc/eq.js
M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
M Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
M Source/JavaScriptCore/wasm/WasmCallingConvention.h
M Source/JavaScriptCore/wasm/WasmFormat.h
M Source/JavaScriptCore/wasm/WasmFunctionParser.h
M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
M Source/JavaScriptCore/wasm/WasmOperationsInlines.h
M Source/JavaScriptCore/wasm/WasmTypeDefinition.h
M Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp
M Source/JavaScriptCore/wasm/js/WasmToJS.cpp
M Source/JavaScriptCore/wasm/wasm.json
Log Message:
-----------
[Wasm-GC] Implement eqref and ref.eq
https://bugs.webkit.org/show_bug.cgi?id=247401
Reviewed by Justin Michaud.
Add support for eqrefs, which support the ref.eq operation to check
equality. For JSC this is the same as I64 equality.
The eq type is effectively the top of the internal type hierarchy until
hostrefs (internalized references to external JS values) are added with
the extern.internalize instruction.
This patch also has a minor change to BBQJIT to fix an oversight in
361c5fba483c9c157cf689d4e60acaccc45d74c5 for a switch case.
* JSTests/wasm/gc/casts.js:
(testEqCasts):
* JSTests/wasm/gc/eq.js: Added.
(testValidation):
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::addRefEq):
(JSC::Wasm::ExpressionType>::emitRefTestOrCast):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addRefEq):
(JSC::Wasm::B3IRGenerator::emitRefTestOrCast):
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::sizeOfType):
(JSC::Wasm::BBQJIT::addConstant):
(JSC::Wasm::BBQJIT::getGlobal):
(JSC::Wasm::BBQJIT::setGlobal):
(JSC::Wasm::BBQJIT::addRefEq):
(JSC::Wasm::BBQJIT::addTopLevel):
(JSC::Wasm::BBQJIT::toB3Type):
(JSC::Wasm::BBQJIT::emitCatchImpl):
(JSC::Wasm::BBQJIT::emitCCall):
(JSC::Wasm::BBQJIT::emitStoreConst):
(JSC::Wasm::BBQJIT::emitMoveConst):
(JSC::Wasm::BBQJIT::emitStore):
(JSC::Wasm::BBQJIT::emitMoveMemory):
(JSC::Wasm::BBQJIT::emitMoveRegister):
(JSC::Wasm::BBQJIT::emitLoad):
* Source/JavaScriptCore/wasm/WasmCallingConvention.h:
(JSC::Wasm::WasmCallingConvention::numberOfStackResults const):
(JSC::Wasm::WasmCallingConvention::numberOfStackArguments const):
* Source/JavaScriptCore/wasm/WasmFormat.h:
(JSC::Wasm::isEqref):
(JSC::Wasm::eqrefType):
(JSC::Wasm::isSubtype):
(JSC::Wasm::isValidHeapTypeKind):
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):
(JSC::Wasm::LLIntGenerator::addRefEq):
* Source/JavaScriptCore/wasm/WasmOperationsInlines.h:
(JSC::Wasm::refCast):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::typeKindSizeInBytes):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::set):
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/wasm.json:
Canonical link: https://commits.webkit.org/261663@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes