[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: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60361}
diff --git a/src/builtins/builtins-definitions.h b/src/builtins/builtins-definitions.h
index 0e7e2cc..408b38b 100644
--- a/src/builtins/builtins-definitions.h
+++ b/src/builtins/builtins-definitions.h
@@ -208,7 +208,7 @@
   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 @@
   TFS(ThrowWasmTrapDataSegmentDropped)                                         \
   TFS(ThrowWasmTrapElemSegmentDropped)                                         \
   TFS(ThrowWasmTrapTableOutOfBounds)                                           \
-  TFC(BigIntToWasmI64, BigIntToWasmI64)                                        \
+  TFC(WasmI64ToBigInt, I64ToBigInt)                                            \
   TFC(WasmBigIntToI64, BigIntToI64)                                            \
                                                                                \
   /* WeakMap */                                                                \
@@ -1436,7 +1436,7 @@
   V(WasmToNumber)                        \
   V(WasmThrow)                           \
   V(DoubleToI)                           \
-  V(BigIntToWasmI64)                     \
+  V(WasmI64ToBigInt)                     \
   V(WasmBigIntToI64)
 
 // The exception thrown in the following builtins are caught internally and will
diff --git a/src/builtins/builtins-wasm-gen.cc b/src/builtins/builtins-wasm-gen.cc
index d40582c..373e9db 100644
--- a/src/builtins/builtins-wasm-gen.cc
+++ b/src/builtins/builtins-wasm-gen.cc
@@ -278,7 +278,7 @@
                             SmiConstant(static_cast<int>(message_id)));
 }
 
-TF_BUILTIN(BigIntToWasmI64, WasmBuiltinsAssembler) {
+TF_BUILTIN(WasmI64ToBigInt, WasmBuiltinsAssembler) {
   if (!Is64()) {
     Unreachable();
     return;
@@ -288,8 +288,7 @@
   TNode<IntPtrT> argument =
       UncheckedCast<IntPtrT>(Parameter(Descriptor::kArgument));
 
-  TailCallStub(BigIntToWasmI64Descriptor(), target, NoContextConstant(),
-               argument);
+  TailCallStub(I64ToBigIntDescriptor(), target, NoContextConstant(), argument);
 }
 
 TF_BUILTIN(WasmBigIntToI64, WasmBuiltinsAssembler) {
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index fa0032b..b6b5ee3 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -5057,7 +5057,7 @@
   }
 
   Node* BuildChangeInt64ToBigInt(Node* input) {
-    BigIntToWasmI64Descriptor interface_descriptor;
+    I64ToBigIntDescriptor interface_descriptor;
 
     auto call_descriptor = Linkage::GetStubCallDescriptor(
         mcgraph()->zone(),                              // zone
@@ -5070,7 +5070,7 @@
     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(
diff --git a/src/interface-descriptors.cc b/src/interface-descriptors.cc
index 4d6af8e..01c179e 100644
--- a/src/interface-descriptors.cc
+++ b/src/interface-descriptors.cc
@@ -407,7 +407,7 @@
   DefaultInitializePlatformSpecific(data, kParameterCount);
 }
 
-void BigIntToWasmI64Descriptor::InitializePlatformSpecific(
+void I64ToBigIntDescriptor::InitializePlatformSpecific(
     CallInterfaceDescriptorData* data) {
   DefaultInitializePlatformSpecific(data, kParameterCount);
 }
diff --git a/src/interface-descriptors.h b/src/interface-descriptors.h
index 208f702..fd8ebd8 100644
--- a/src/interface-descriptors.h
+++ b/src/interface-descriptors.h
@@ -28,7 +28,7 @@
   V(ArraySingleArgumentConstructor)   \
   V(AsyncFunctionStackParameter)      \
   V(BigIntToI64)                      \
-  V(BigIntToWasmI64)                  \
+  V(I64ToBigInt)                      \
   V(BinaryOp)                         \
   V(CallForwardVarargs)               \
   V(CallFunctionTemplate)             \
@@ -1183,11 +1183,11 @@
   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 {