Commit d43ff4d9 authored by Matthias Liedtke's avatar Matthias Liedtke Committed by V8 LUCI CQ

[wasm-gc] Remove obsolete function handling from ToJS wrapper code

Bug: v8:7748
Change-Id: I90c24cbddee7744fba779a0c25f5e4dd860137a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3823125
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82338}
parent 0aef7a89
......@@ -6325,25 +6325,15 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
// Smis.
// TODO(7748): Update this when JS interop is settled.
auto wrap = gasm_->MakeLabel();
auto function = gasm_->MakeLabel();
auto done = gasm_->MakeLabel(MachineRepresentation::kTaggedPointer);
gasm_->GotoIf(IsSmi(node), &done, node);
gasm_->GotoIf(gasm_->IsDataRefMap(gasm_->LoadMap(node)), &wrap);
gasm_->GotoIf(
gasm_->HasInstanceType(node, WASM_INTERNAL_FUNCTION_TYPE),
&function);
// This includes the case where {node == null}.
gasm_->Goto(&done, node);
gasm_->Bind(&wrap);
gasm_->Goto(&done, BuildAllocateObjectWrapper(node, context));
gasm_->Bind(&function);
gasm_->Goto(&done, gasm_->LoadFromObject(
MachineType::TaggedPointer(), node,
wasm::ObjectAccess::ToTagged(
WasmInternalFunction::kExternalOffset)));
gasm_->Bind(&done);
return done.PhiAt(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment