OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #error "Unknown architecture." | 59 #error "Unknown architecture." |
60 #endif // Target architecture. | 60 #endif // Target architecture. |
61 #endif // V8_INTERPRETED_REGEXP | 61 #endif // V8_INTERPRETED_REGEXP |
62 | 62 |
63 namespace v8 { | 63 namespace v8 { |
64 namespace internal { | 64 namespace internal { |
65 | 65 |
66 | 66 |
67 const double DoubleConstant::min_int = kMinInt; | 67 const double DoubleConstant::min_int = kMinInt; |
68 const double DoubleConstant::one_half = 0.5; | 68 const double DoubleConstant::one_half = 0.5; |
| 69 const double DoubleConstant::minus_zero = -0.0; |
69 const double DoubleConstant::negative_infinity = -V8_INFINITY; | 70 const double DoubleConstant::negative_infinity = -V8_INFINITY; |
70 | 71 |
71 | 72 |
72 // ----------------------------------------------------------------------------- | 73 // ----------------------------------------------------------------------------- |
73 // Implementation of Label | 74 // Implementation of Label |
74 | 75 |
75 int Label::pos() const { | 76 int Label::pos() const { |
76 if (pos_ < 0) return -pos_ - 1; | 77 if (pos_ < 0) return -pos_ - 1; |
77 if (pos_ > 0) return pos_ - 1; | 78 if (pos_ > 0) return pos_ - 1; |
78 UNREACHABLE(); | 79 UNREACHABLE(); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 const_cast<double*>(&DoubleConstant::min_int))); | 718 const_cast<double*>(&DoubleConstant::min_int))); |
718 } | 719 } |
719 | 720 |
720 | 721 |
721 ExternalReference ExternalReference::address_of_one_half() { | 722 ExternalReference ExternalReference::address_of_one_half() { |
722 return ExternalReference(reinterpret_cast<void*>( | 723 return ExternalReference(reinterpret_cast<void*>( |
723 const_cast<double*>(&DoubleConstant::one_half))); | 724 const_cast<double*>(&DoubleConstant::one_half))); |
724 } | 725 } |
725 | 726 |
726 | 727 |
| 728 ExternalReference ExternalReference::address_of_minus_zero() { |
| 729 return ExternalReference(reinterpret_cast<void*>( |
| 730 const_cast<double*>(&DoubleConstant::minus_zero))); |
| 731 } |
| 732 |
| 733 |
727 ExternalReference ExternalReference::address_of_negative_infinity() { | 734 ExternalReference ExternalReference::address_of_negative_infinity() { |
728 return ExternalReference(reinterpret_cast<void*>( | 735 return ExternalReference(reinterpret_cast<void*>( |
729 const_cast<double*>(&DoubleConstant::negative_infinity))); | 736 const_cast<double*>(&DoubleConstant::negative_infinity))); |
730 } | 737 } |
731 | 738 |
732 | 739 |
733 #ifndef V8_INTERPRETED_REGEXP | 740 #ifndef V8_INTERPRETED_REGEXP |
734 | 741 |
735 ExternalReference ExternalReference::re_check_stack_guard_state() { | 742 ExternalReference ExternalReference::re_check_stack_guard_state() { |
736 Address function; | 743 Address function; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 943 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
937 state_.written_position = state_.current_position; | 944 state_.written_position = state_.current_position; |
938 written = true; | 945 written = true; |
939 } | 946 } |
940 | 947 |
941 // Return whether something was written. | 948 // Return whether something was written. |
942 return written; | 949 return written; |
943 } | 950 } |
944 | 951 |
945 } } // namespace v8::internal | 952 } } // namespace v8::internal |
OLD | NEW |