Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 26cb4d1f6cc3c3d343f81c21c427b92d753cdefb https://github.com/WebKit/WebKit/commit/26cb4d1f6cc3c3d343f81c21c427b92d753cdefb Author: Asumu Takikawa <as...@igalia.com> Date: 2023-12-01 (Fri, 01 Dec 2023)
Changed paths: A JSTests/wasm/function-references-spec-tests/br_on_non_null.wast.js A JSTests/wasm/function-references-spec-tests/br_on_null.wast.js A JSTests/wasm/function-references/br_on_null.js M JSTests/wasm/wasm.json M Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp M Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp M Source/JavaScriptCore/wasm/WasmFunctionParser.h M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp M Source/JavaScriptCore/wasm/wasm.json Log Message: ----------- [WASM-Function-References] Add br_on_null/on_non_null instructions https://bugs.webkit.org/show_bug.cgi?id=251038 Reviewed by Justin Michaud. Add br_on_null/non-null instructions from the typed funcref proposal. The underlying operation added to generators is `addBranchNull`. While it's tempting to try to call `addRefIsNull` and `addBranch` to implement this, it doesn't work well due to the requirements of data gets left on the stack or thrown via the branch. Also fixes an existing typo in `checkBranchTarget`. * JSTests/wasm/function-references-spec-tests/br_on_non_null.wast.js: Added. * JSTests/wasm/function-references-spec-tests/br_on_null.wast.js: Added. * JSTests/wasm/function-references/br_on_null.js: Added. (module): (async br_on_null): (async br_on_non_null): * JSTests/wasm/wasm.json: * Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::addBranchNull): (JSC::Wasm::B3IRGenerator::addExternConvertAny): Deleted. * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJIT::addBranchNull): (JSC::Wasm::BBQJIT::addSwitch): (JSC::Wasm::BBQJIT::addExternConvertAny): Deleted. * Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp: (JSC::Wasm::ConstExprGenerator::addExternConvertAny): Deleted. * Source/JavaScriptCore/wasm/WasmFunctionParser.h: (JSC::Wasm::FunctionParser<Context>::checkBranchTarget): (JSC::Wasm::FunctionParser<Context>::parseExpression): (JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression): * Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp: (JSC::Wasm::IPIntGenerator::addBranch): (JSC::Wasm::IPIntGenerator::addExternConvertAny): Deleted. * Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::addBranch): (JSC::Wasm::LLIntGenerator::addBranchNull): (JSC::Wasm::LLIntGenerator::addExternConvertAny): Deleted. * Source/JavaScriptCore/wasm/wasm.json: Canonical link: https://commits.webkit.org/271399@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes