diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2016-03-01 08:58:05 -0800 |
---|---|---|
committer | Ali Sheikh <ofrobots@lemonhope.roam.corp.google.com> | 2016-03-03 20:35:20 -0800 |
commit | 069e02ab47656b3efd1b6829c65856b2e1c2d1db (patch) | |
tree | eb643e0a2e88fd64bb9fc927423458d2ae96c2db /deps/v8/src/runtime/runtime-numbers.cc | |
parent | 8938355398c79f583a468284b768652d12ba9bc9 (diff) | |
download | android-node-v8-069e02ab47656b3efd1b6829c65856b2e1c2d1db.tar.gz android-node-v8-069e02ab47656b3efd1b6829c65856b2e1c2d1db.tar.bz2 android-node-v8-069e02ab47656b3efd1b6829c65856b2e1c2d1db.zip |
deps: upgrade to V8 4.9.385.18
Pick up the current branch head for V8 4.9
https://github.com/v8/v8/commit/1ecba0f
PR-URL: https://github.com/nodejs/node/pull/4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'deps/v8/src/runtime/runtime-numbers.cc')
-rw-r--r-- | deps/v8/src/runtime/runtime-numbers.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/deps/v8/src/runtime/runtime-numbers.cc b/deps/v8/src/runtime/runtime-numbers.cc index f976df951c..46fbff3463 100644 --- a/deps/v8/src/runtime/runtime-numbers.cc +++ b/deps/v8/src/runtime/runtime-numbers.cc @@ -114,11 +114,13 @@ RUNTIME_FUNCTION(Runtime_StringToNumber) { } +// ES6 18.2.5 parseInt(string, radix) slow path RUNTIME_FUNCTION(Runtime_StringParseInt) { HandleScope handle_scope(isolate); DCHECK(args.length() == 2); CONVERT_ARG_HANDLE_CHECKED(String, subject, 0); CONVERT_NUMBER_CHECKED(int, radix, Int32, args[1]); + // Step 8.a. is already handled in the JS function. RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36)); subject = String::Flatten(subject); @@ -128,7 +130,6 @@ RUNTIME_FUNCTION(Runtime_StringParseInt) { DisallowHeapAllocation no_gc; String::FlatContent flat = subject->GetFlatContent(); - // ECMA-262 section 15.1.2.3, empty string is NaN if (flat.IsOneByte()) { value = StringToInt(isolate->unicode_cache(), flat.ToOneByteVector(), radix); @@ -141,6 +142,7 @@ RUNTIME_FUNCTION(Runtime_StringParseInt) { } +// ES6 18.2.4 parseFloat(string) RUNTIME_FUNCTION(Runtime_StringParseFloat) { HandleScope shs(isolate); DCHECK(args.length() == 1); @@ -316,5 +318,20 @@ RUNTIME_FUNCTION(Runtime_GetRootNaN) { return isolate->heap()->nan_value(); } + +RUNTIME_FUNCTION(Runtime_GetHoleNaNUpper) { + HandleScope scope(isolate); + DCHECK(args.length() == 0); + return *isolate->factory()->NewNumberFromUint(kHoleNanUpper32); +} + + +RUNTIME_FUNCTION(Runtime_GetHoleNaNLower) { + HandleScope scope(isolate); + DCHECK(args.length() == 0); + return *isolate->factory()->NewNumberFromUint(kHoleNanLower32); +} + + } // namespace internal } // namespace v8 |