diff --git a/include/hermes/VM/Operations.h b/include/hermes/VM/Operations.h index 063973f341d..ca3aa58b785 100644 --- a/include/hermes/VM/Operations.h +++ b/include/hermes/VM/Operations.h @@ -456,7 +456,7 @@ bool isIntegralNumber(double number); CallResult toBigInt_RJS(Runtime &runtime, Handle<> value); // ES2022 7.1.14 StringToBigInt -CallResult stringToBigInt_RJS(Runtime &runtime, Handle<> value); +CallResult stringToBigInt(Runtime &runtime, Handle<> value); // ES2022 21.2.3 Properties of the BigInt Prototype Object - thisBigIntValue CallResult thisBigIntValue(Runtime &runtime, Handle<> value); diff --git a/lib/VM/Operations.cpp b/lib/VM/Operations.cpp index e8942979aed..8fe82ea3477 100644 --- a/lib/VM/Operations.cpp +++ b/lib/VM/Operations.cpp @@ -846,7 +846,7 @@ static CallResult compareBigIntAndString( bool (*comparator)(int)) { assert(rightHandle->isString() && "rhs should be string"); - auto bigintRight = stringToBigInt_RJS(runtime, rightHandle); + auto bigintRight = stringToBigInt(runtime, rightHandle); if (LLVM_UNLIKELY(bigintRight == ExecutionStatus::EXCEPTION)) { return ExecutionStatus::EXCEPTION; } @@ -1077,7 +1077,7 @@ abstractEqualityTest_RJS(Runtime &runtime, Handle<> xHandle, Handle<> yHandle) { // 6. If Type(x) is BigInt and Type(y) is String, then CASE_M_M(BigInt, Str) { // a. Let n be ! StringToBigInt(y). - auto n = stringToBigInt_RJS(runtime, y); + auto n = stringToBigInt(runtime, y); if (LLVM_UNLIKELY(n == ExecutionStatus::EXCEPTION)) { return ExecutionStatus::EXCEPTION; } @@ -2227,7 +2227,7 @@ CallResult toBigInt_RJS(Runtime &runtime, Handle<> value) { return *prim; case HermesValue::ETag::Str1: case HermesValue::ETag::Str2: { - auto n = stringToBigInt_RJS(runtime, runtime.makeHandle(*prim)); + auto n = stringToBigInt(runtime, runtime.makeHandle(*prim)); if (LLVM_UNLIKELY(n == ExecutionStatus::EXCEPTION)) { return ExecutionStatus::EXCEPTION; } @@ -2243,7 +2243,7 @@ CallResult toBigInt_RJS(Runtime &runtime, Handle<> value) { return runtime.raiseTypeError("invalid argument to BigInt()"); } -CallResult stringToBigInt_RJS(Runtime &runtime, Handle<> value) { +CallResult stringToBigInt(Runtime &runtime, Handle<> value) { if (value->isString()) { auto str = value->getString();