Commit 6f5f8e6c authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

Revert "[wasm] Introduce CallInfo in WasmGraphBuildingInterface"

This reverts commit db95e20b.

Reason for revert: UBSan failures https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/18300/overview

Original change's description:
> [wasm] Introduce CallInfo in WasmGraphBuildingInterface
>
> The DoCall and DoReturnCall functions implement function calls in
> WasmGraphBuilderInterface. These functions need different arguments
> based on if the call is direct, indirect or call_ref. Right now, these
> arguments are misnamed in some cases, and callers have to pass default
> values for unused arguments.
> This CL tidies up the arguments of these functions by introducing a
> CallInfo class which provides different constructors based on the type
> of the call, where only the required arguments need to be passed.
>
> Change-Id: Ie03de6d3cf253a9baa0369f569589bb91d0b1866
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162606
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76910}

Change-Id: Ie0b288b3cbb66de4858fb7fbf1bc992518e637d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3168284
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#76911}
parent db95e20b
......@@ -3155,7 +3155,7 @@ Node* WasmGraphBuilder::BuildLoadCallTargetFromExportedFunctionData(
}
// TODO(9495): Support CAPI function refs.
Node* WasmGraphBuilder::BuildCallRef(const wasm::FunctionSig* sig,
Node* WasmGraphBuilder::BuildCallRef(uint32_t sig_index,
base::Vector<Node*> args,
base::Vector<Node*> rets,
CheckForNull null_check,
......@@ -3166,6 +3166,8 @@ Node* WasmGraphBuilder::BuildCallRef(const wasm::FunctionSig* sig,
position);
}
const wasm::FunctionSig* sig = env_->module->signature(sig_index);
Node* function_data = gasm_->LoadFunctionDataFromJSFunction(args[0]);
auto load_target = gasm_->MakeLabel();
......@@ -3241,21 +3243,20 @@ void WasmGraphBuilder::CompareToExternalFunctionAtIndex(
failure_control, BranchHint::kTrue);
}
Node* WasmGraphBuilder::CallRef(const wasm::FunctionSig* sig,
base::Vector<Node*> args,
Node* WasmGraphBuilder::CallRef(uint32_t sig_index, base::Vector<Node*> args,
base::Vector<Node*> rets,
WasmGraphBuilder::CheckForNull null_check,
wasm::WasmCodePosition position) {
return BuildCallRef(sig, args, rets, null_check, IsReturnCall::kCallContinues,
position);
return BuildCallRef(sig_index, args, rets, null_check,
IsReturnCall::kCallContinues, position);
}
Node* WasmGraphBuilder::ReturnCallRef(const wasm::FunctionSig* sig,
Node* WasmGraphBuilder::ReturnCallRef(uint32_t sig_index,
base::Vector<Node*> args,
WasmGraphBuilder::CheckForNull null_check,
wasm::WasmCodePosition position) {
return BuildCallRef(sig, args, {}, null_check, IsReturnCall::kReturnCall,
position);
return BuildCallRef(sig_index, args, {}, null_check,
IsReturnCall::kReturnCall, position);
}
Node* WasmGraphBuilder::ReturnCall(uint32_t index, base::Vector<Node*> args,
......
......@@ -325,7 +325,7 @@ class WasmGraphBuilder {
Node* CallIndirect(uint32_t table_index, uint32_t sig_index,
base::Vector<Node*> args, base::Vector<Node*> rets,
wasm::WasmCodePosition position);
Node* CallRef(const wasm::FunctionSig* sig, base::Vector<Node*> args,
Node* CallRef(uint32_t sig_index, base::Vector<Node*> args,
base::Vector<Node*> rets, CheckForNull null_check,
wasm::WasmCodePosition position);
void CompareToExternalFunctionAtIndex(Node* func_ref, uint32_t function_index,
......@@ -337,7 +337,7 @@ class WasmGraphBuilder {
Node* ReturnCallIndirect(uint32_t table_index, uint32_t sig_index,
base::Vector<Node*> args,
wasm::WasmCodePosition position);
Node* ReturnCallRef(const wasm::FunctionSig* sig, base::Vector<Node*> args,
Node* ReturnCallRef(uint32_t sig_index, base::Vector<Node*> args,
CheckForNull null_check, wasm::WasmCodePosition position);
void BrOnNull(Node* ref_object, Node** non_null_node, Node** null_node);
......@@ -589,7 +589,7 @@ class WasmGraphBuilder {
base::Vector<Node*> rets,
wasm::WasmCodePosition position, Node* func_index,
IsReturnCall continuation);
Node* BuildCallRef(const wasm::FunctionSig* sig, base::Vector<Node*> args,
Node* BuildCallRef(uint32_t sig_index, base::Vector<Node*> args,
base::Vector<Node*> rets, CheckForNull null_check,
IsReturnCall continuation,
wasm::WasmCodePosition position);
......
This diff is collapsed.
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