| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 return *isolate->factory()->NewNumber(value); | 223 return *isolate->factory()->NewNumber(value); |
| 224 } | 224 } |
| 225 | 225 |
| 226 | 226 |
| 227 RUNTIME_FUNCTION(Runtime_StringParseFloat) { | 227 RUNTIME_FUNCTION(Runtime_StringParseFloat) { |
| 228 HandleScope shs(isolate); | 228 HandleScope shs(isolate); |
| 229 DCHECK(args.length() == 1); | 229 DCHECK(args.length() == 1); |
| 230 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0); | 230 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0); |
| 231 | 231 |
| 232 double value = StringToDouble(isolate->unicode_cache(), subject, | 232 double value = |
| 233 ALLOW_TRAILING_JUNK, base::OS::nan_value()); | 233 StringToDouble(isolate->unicode_cache(), subject, ALLOW_TRAILING_JUNK, |
| 234 std::numeric_limits<double>::quiet_NaN()); |
| 234 | 235 |
| 235 return *isolate->factory()->NewNumber(value); | 236 return *isolate->factory()->NewNumber(value); |
| 236 } | 237 } |
| 237 | 238 |
| 238 | 239 |
| 239 RUNTIME_FUNCTION(Runtime_NumberToStringRT) { | 240 RUNTIME_FUNCTION(Runtime_NumberToStringRT) { |
| 240 HandleScope scope(isolate); | 241 HandleScope scope(isolate); |
| 241 DCHECK(args.length() == 1); | 242 DCHECK(args.length() == 1); |
| 242 CONVERT_NUMBER_ARG_HANDLE_CHECKED(number, 0); | 243 CONVERT_NUMBER_ARG_HANDLE_CHECKED(number, 0); |
| 243 | 244 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 588 |
| 588 RUNTIME_FUNCTION(RuntimeReference_IsNonNegativeSmi) { | 589 RUNTIME_FUNCTION(RuntimeReference_IsNonNegativeSmi) { |
| 589 SealHandleScope shs(isolate); | 590 SealHandleScope shs(isolate); |
| 590 DCHECK(args.length() == 1); | 591 DCHECK(args.length() == 1); |
| 591 CONVERT_ARG_CHECKED(Object, obj, 0); | 592 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 592 return isolate->heap()->ToBoolean(obj->IsSmi() && | 593 return isolate->heap()->ToBoolean(obj->IsSmi() && |
| 593 Smi::cast(obj)->value() >= 0); | 594 Smi::cast(obj)->value() >= 0); |
| 594 } | 595 } |
| 595 } | 596 } |
| 596 } // namespace v8::internal | 597 } // namespace v8::internal |
| OLD | NEW |