Commit f30f503e authored by Sven Sauleau's avatar Sven Sauleau Committed by Commit Bot

[wasm] rename BigIntToWasmI64

Previously, the builtin BigIntToWasmI64 and its calling descriptor had
an inconsistent name, not reflecting the signature which is i64 to BigInt.

This CL removes BigIntToWasmI64 in favor of I64ToBigInt. Also for
consistency the Wasm tranpoline has been renamed from BigIntToWasmI64
to WasmI64ToBigInt.

Change-Id: I4125ee99a7358797181770f413db70affa657d5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532065
Auto-Submit: Sven Sauleau <ssauleau@igalia.com>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60361}
parent 9d167f57
......@@ -208,7 +208,7 @@ namespace internal {
TFC(Typeof, Typeof) \
TFC(GetSuperConstructor, Typeof) \
TFC(BigIntToI64, BigIntToI64) \
TFC(I64ToBigInt, BigIntToWasmI64) \
TFC(I64ToBigInt, I64ToBigInt) \
\
/* Type conversions continuations */ \
TFC(ToBooleanLazyDeoptContinuation, TypeConversionStackParameter) \
......@@ -1138,7 +1138,7 @@ namespace internal {
TFS(ThrowWasmTrapDataSegmentDropped) \
TFS(ThrowWasmTrapElemSegmentDropped) \
TFS(ThrowWasmTrapTableOutOfBounds) \
TFC(BigIntToWasmI64, BigIntToWasmI64) \
TFC(WasmI64ToBigInt, I64ToBigInt) \
TFC(WasmBigIntToI64, BigIntToI64) \
\
/* WeakMap */ \
......@@ -1436,7 +1436,7 @@ namespace internal {
V(WasmToNumber) \
V(WasmThrow) \
V(DoubleToI) \
V(BigIntToWasmI64) \
V(WasmI64ToBigInt) \
V(WasmBigIntToI64)
// The exception thrown in the following builtins are caught internally and will
......
......@@ -278,7 +278,7 @@ TF_BUILTIN(WasmTableSet, WasmBuiltinsAssembler) {
SmiConstant(static_cast<int>(message_id)));
}
TF_BUILTIN(BigIntToWasmI64, WasmBuiltinsAssembler) {
TF_BUILTIN(WasmI64ToBigInt, WasmBuiltinsAssembler) {
if (!Is64()) {
Unreachable();
return;
......@@ -288,8 +288,7 @@ TF_BUILTIN(BigIntToWasmI64, WasmBuiltinsAssembler) {
TNode<IntPtrT> argument =
UncheckedCast<IntPtrT>(Parameter(Descriptor::kArgument));
TailCallStub(BigIntToWasmI64Descriptor(), target, NoContextConstant(),
argument);
TailCallStub(I64ToBigIntDescriptor(), target, NoContextConstant(), argument);
}
TF_BUILTIN(WasmBigIntToI64, WasmBuiltinsAssembler) {
......
......@@ -5057,7 +5057,7 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
}
Node* BuildChangeInt64ToBigInt(Node* input) {
BigIntToWasmI64Descriptor interface_descriptor;
I64ToBigIntDescriptor interface_descriptor;
auto call_descriptor = Linkage::GetStubCallDescriptor(
mcgraph()->zone(), // zone
......@@ -5070,7 +5070,7 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
Node* target =
(stub_mode_ == StubCallMode::kCallWasmRuntimeStub)
? mcgraph()->RelocatableIntPtrConstant(
wasm::WasmCode::kBigIntToWasmI64, RelocInfo::WASM_STUB_CALL)
wasm::WasmCode::kWasmI64ToBigInt, RelocInfo::WASM_STUB_CALL)
: jsgraph()->HeapConstant(BUILTIN_CODE(isolate_, I64ToBigInt));
return SetEffect(
......
......@@ -407,7 +407,7 @@ void RunMicrotasksDescriptor::InitializePlatformSpecific(
DefaultInitializePlatformSpecific(data, kParameterCount);
}
void BigIntToWasmI64Descriptor::InitializePlatformSpecific(
void I64ToBigIntDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
DefaultInitializePlatformSpecific(data, kParameterCount);
}
......
......@@ -28,7 +28,7 @@ namespace internal {
V(ArraySingleArgumentConstructor) \
V(AsyncFunctionStackParameter) \
V(BigIntToI64) \
V(BigIntToWasmI64) \
V(I64ToBigInt) \
V(BinaryOp) \
V(CallForwardVarargs) \
V(CallFunctionTemplate) \
......@@ -1183,11 +1183,11 @@ class WasmThrowDescriptor final : public CallInterfaceDescriptor {
DECLARE_DESCRIPTOR(WasmThrowDescriptor, CallInterfaceDescriptor)
};
class BigIntToWasmI64Descriptor final : public CallInterfaceDescriptor {
class I64ToBigIntDescriptor final : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS_NO_CONTEXT(kArgument)
DEFINE_PARAMETER_TYPES(MachineType::Int64()) // kArgument
DECLARE_DESCRIPTOR(BigIntToWasmI64Descriptor, CallInterfaceDescriptor)
DECLARE_DESCRIPTOR(I64ToBigIntDescriptor, CallInterfaceDescriptor)
};
class BigIntToI64Descriptor final : public CallInterfaceDescriptor {
......
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