<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - WebAssembly -> JS: don't do a double entry"
href="https://bugs.webkit.org/show_bug.cgi?id=166486#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - WebAssembly -> JS: don't do a double entry"
href="https://bugs.webkit.org/show_bug.cgi?id=166486">bug 166486</a>
from <span class="vcard"><a class="email" href="mailto:jfbastien@apple.com" title="JF Bastien <jfbastien@apple.com>"> <span class="fn">JF Bastien</span></a>
</span></b>
<pre>We should also consider optimizing as discussed here:
<span class="quote">> > > > Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp:90
> > > > + // Always start with a dummy Memory, so that wasm -> wasm thunks avoid checking for a nullptr Memory when trying to set pinned registers.
> > > > + Wasm::Memory memory;
> > > > + instance->setMemory(vm, JSWebAssemblyMemory::create(vm, exec->lexicalGlobalObject()->WebAssemblyMemoryStructure(), WTFMove(memory)));
> > >
> > > This makes me wonder if we're better off just having the callee instead of
> > > caller generate a wasm->wasm call thunk. Maybe we should do that in a later
> > > patch, or at least have a bug open to consider it.
> >
> > Yeah I guess we could have an off-to-the-side entrypeint from "other wasm",
> > in addition to the regular "entry from this wasm instance", for all of the
> > exported functions. We'd need to also change the callee codegen, but then we
> > wouldn't need to tail (or rather, we'd inline that tail).
> >
> > That could be more efficient.
> Yeah, let's open a bug and deal with it later.</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>