diff options
Diffstat (limited to 'deps/v8/src/builtins/builtins-conversion-gen.cc')
-rw-r--r-- | deps/v8/src/builtins/builtins-conversion-gen.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/deps/v8/src/builtins/builtins-conversion-gen.cc b/deps/v8/src/builtins/builtins-conversion-gen.cc index b1441adc372..7bdc2759c4e 100644 --- a/deps/v8/src/builtins/builtins-conversion-gen.cc +++ b/deps/v8/src/builtins/builtins-conversion-gen.cc @@ -142,6 +142,14 @@ TF_BUILTIN(ToNumber, CodeStubAssembler) { Return(ToNumber(context, input)); } +// Like ToNumber, but also converts BigInts. +TF_BUILTIN(ToNumberConvertBigInt, CodeStubAssembler) { + Node* context = Parameter(Descriptor::kContext); + Node* input = Parameter(Descriptor::kArgument); + + Return(ToNumber(context, input, BigIntHandling::kConvertToNumber)); +} + // ES section #sec-tostring-applied-to-the-number-type TF_BUILTIN(NumberToString, CodeStubAssembler) { TNode<Number> input = CAST(Parameter(Descriptor::kArgument)); @@ -368,7 +376,7 @@ TF_BUILTIN(ToObject, CodeStubAssembler) { Goto(&if_wrapjsvalue); BIND(&if_wrapjsvalue); - Node* native_context = LoadNativeContext(context); + TNode<Context> native_context = LoadNativeContext(context); Node* constructor = LoadFixedArrayElement( native_context, constructor_function_index_var.value()); Node* initial_map = |