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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 } | 572 } |
573 | 573 |
574 | 574 |
575 RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) { | 575 RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) { |
576 SealHandleScope shs(isolate); | 576 SealHandleScope shs(isolate); |
577 DCHECK(args.length() == 1); | 577 DCHECK(args.length() == 1); |
578 CONVERT_ARG_CHECKED(Object, obj, 0); | 578 CONVERT_ARG_CHECKED(Object, obj, 0); |
579 return isolate->heap()->ToBoolean(obj->IsSmi() && | 579 return isolate->heap()->ToBoolean(obj->IsSmi() && |
580 Smi::cast(obj)->value() >= 0); | 580 Smi::cast(obj)->value() >= 0); |
581 } | 581 } |
| 582 |
| 583 |
| 584 RUNTIME_FUNCTION(Runtime_GetRootNaN) { |
| 585 SealHandleScope shs(isolate); |
| 586 DCHECK(args.length() == 0); |
| 587 return isolate->heap()->nan_value(); |
| 588 } |
582 } | 589 } |
583 } // namespace v8::internal | 590 } // namespace v8::internal |
OLD | NEW |