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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 x_scaled /= 10; | 544 x_scaled /= 10; |
545 tie = GREATER; | 545 tie = GREATER; |
546 } | 546 } |
547 | 547 |
548 if (x_scaled < y_scaled) return Smi::FromInt(LESS); | 548 if (x_scaled < y_scaled) return Smi::FromInt(LESS); |
549 if (x_scaled > y_scaled) return Smi::FromInt(GREATER); | 549 if (x_scaled > y_scaled) return Smi::FromInt(GREATER); |
550 return Smi::FromInt(tie); | 550 return Smi::FromInt(tie); |
551 } | 551 } |
552 | 552 |
553 | 553 |
554 RUNTIME_FUNCTION(Runtime_GetRootNaN) { | |
555 SealHandleScope shs(isolate); | |
556 DCHECK(args.length() == 0); | |
557 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); | |
558 return isolate->heap()->nan_value(); | |
559 } | |
560 | |
561 | |
562 RUNTIME_FUNCTION(Runtime_MaxSmi) { | 554 RUNTIME_FUNCTION(Runtime_MaxSmi) { |
563 SealHandleScope shs(isolate); | 555 SealHandleScope shs(isolate); |
564 DCHECK(args.length() == 0); | 556 DCHECK(args.length() == 0); |
565 return Smi::FromInt(Smi::kMaxValue); | 557 return Smi::FromInt(Smi::kMaxValue); |
566 } | 558 } |
567 | 559 |
568 | 560 |
569 RUNTIME_FUNCTION(Runtime_NumberToString) { | 561 RUNTIME_FUNCTION(Runtime_NumberToString) { |
570 SealHandleScope shs(isolate); | 562 SealHandleScope shs(isolate); |
571 return __RT_impl_Runtime_NumberToStringRT(args, isolate); | 563 return __RT_impl_Runtime_NumberToStringRT(args, isolate); |
(...skipping 10 matching lines...) Expand all Loading... |
582 | 574 |
583 RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) { | 575 RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) { |
584 SealHandleScope shs(isolate); | 576 SealHandleScope shs(isolate); |
585 DCHECK(args.length() == 1); | 577 DCHECK(args.length() == 1); |
586 CONVERT_ARG_CHECKED(Object, obj, 0); | 578 CONVERT_ARG_CHECKED(Object, obj, 0); |
587 return isolate->heap()->ToBoolean(obj->IsSmi() && | 579 return isolate->heap()->ToBoolean(obj->IsSmi() && |
588 Smi::cast(obj)->value() >= 0); | 580 Smi::cast(obj)->value() >= 0); |
589 } | 581 } |
590 } | 582 } |
591 } // namespace v8::internal | 583 } // namespace v8::internal |
OLD | NEW |