Function references proposal introduces new form of ref.null instruction that can take <heaptype> immediate. To fully support the proposal we need to add new form of ref.null.
<rdar://problem/82816107>
Created attachment 440184 [details] Patch
Created attachment 440187 [details] Patch
Created attachment 442681 [details] Patch
Comment on attachment 442681 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442681&action=review r=me with nit. > Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:3456 > + append(Move, Arg::bigImm(JSValue::encode(jsNull())), tmp1); > + append(Compare64, Arg::relCond(MacroAssembler::Equal), calleeFunction, tmp1, tmp2); > + emitCheck([&] { > + return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), tmp2, tmp2); > + }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) { > + this->emitThrowException(jit, ExceptionType::NullReference); > + }); We should use Branch64 instead of Compare64 and BranchTest32.
Created attachment 442794 [details] Patch
Comment on attachment 442794 [details] Patch r=me
Committed r285065 (243707@main): <https://commits.webkit.org/243707@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442794 [details].