Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Jan 8, 2025
2 parents 2399a4a + 6dd66bc commit 3cb28b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 4 additions & 2 deletions JSTests/wasm/gc/call_ref.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ import { compile, instantiate } from "./wast-wrapper.js";

function testRefSubtyping() {
// A call to a subtype should validate.
instantiate(`
var m = instantiate(`
(module
(type (sub (func (param i32))))
(type (sub 0 (func (param i32))))
(global (ref 1) (ref.func 0))
(func (type 1))
(func (call_ref 0 (i32.const 3) (global.get 0)))
(func (export "main") (call_ref 0 (i32.const 3) (global.get 0)))
)
`);
for (let i = 0; i < 10000; i++)
m.exports.main();
}

function testArgSubtyping() {
Expand Down
3 changes: 1 addition & 2 deletions Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,8 +1052,7 @@ WASM_IPINT_EXTERN_CPP_DECL(prepare_call_ref, CallFrame* callFrame, Wasm::TypeInd
else
sp->ref = CalleeBits::encodeNullCallee();

// FIXME: https://bugs.webkit.org/show_bug.cgi?id=260820
ASSERT(function.typeIndex == static_cast<Wasm::IPIntCallee*>(callFrame->callee().asNativeCallee())->signature(typeIndex).index());
ASSERT(Wasm::isSubtypeIndex(function.typeIndex, static_cast<Wasm::IPIntCallee*>(callFrame->callee().asNativeCallee())->signature(typeIndex).index()));
UNUSED_PARAM(typeIndex);
auto callTarget = *function.entrypointLoadLocation;
WASM_CALL_RETURN(calleeInstance, callTarget);
Expand Down
3 changes: 1 addition & 2 deletions Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,7 @@ static inline UGPRPair doWasmCallRef(Register* partiallyConstructedCalleeFrame,
else
functionInfoSlot = function->targetInstance.get();

// FIXME: https://bugs.webkit.org/show_bug.cgi?id=260820
ASSERT(function->typeIndex == CALLEE()->signature(typeIndex).index());
ASSERT(Wasm::isSubtypeIndex(function->typeIndex, CALLEE()->signature(typeIndex).index()));
UNUSED_PARAM(typeIndex);
auto callTarget = *function->entrypointLoadLocation;
WASM_CALL_RETURN(calleeInstance, callTarget);
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/WebProcess/WebProcess.messages.in
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ messages -> WebProcess : AuxiliaryProcess WantsAsyncDispatchMessage {
ReleaseMemory() -> ()

#if ENABLE(NOTIFY_BLOCKING)
PostNotification(String message, std::optional<uint64_t> state)
PostObserverNotification(String message)
[DeferSendingIfSuspendedWithCoalescingKeys=(message)] PostNotification(String message, std::optional<uint64_t> state)
[DeferSendingIfSuspended] PostObserverNotification(String message)
#endif

#if ENABLE(CONTENT_EXTENSIONS)
Expand Down

0 comments on commit 3cb28b3

Please sign in to comment.