OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 2011 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 // |
11 // - Redistribution in binary form must reproduce the above copyright | 11 // - Redistribution in binary form must reproduce the above copyright |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 namespace v8 { | 65 namespace v8 { |
66 namespace internal { | 66 namespace internal { |
67 | 67 |
68 | 68 |
69 const double DoubleConstant::min_int = kMinInt; | 69 const double DoubleConstant::min_int = kMinInt; |
70 const double DoubleConstant::one_half = 0.5; | 70 const double DoubleConstant::one_half = 0.5; |
71 const double DoubleConstant::minus_zero = -0.0; | 71 const double DoubleConstant::minus_zero = -0.0; |
72 const double DoubleConstant::uint8_max_value = 255; | 72 const double DoubleConstant::uint8_max_value = 255; |
73 const double DoubleConstant::zero = 0.0; | 73 const double DoubleConstant::zero = 0.0; |
74 const double DoubleConstant::nan = OS::nan_value(); | 74 const double DoubleConstant::canonical_non_hole_nan = |
| 75 BitCast<double>(kCanonicalNonHoleNanInt64); |
| 76 const double DoubleConstant::the_hole_nan = BitCast<double>(kHoleNanInt64); |
75 const double DoubleConstant::negative_infinity = -V8_INFINITY; | 77 const double DoubleConstant::negative_infinity = -V8_INFINITY; |
76 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; | 78 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; |
77 | 79 |
78 // ----------------------------------------------------------------------------- | 80 // ----------------------------------------------------------------------------- |
79 // Implementation of AssemblerBase | 81 // Implementation of AssemblerBase |
80 | 82 |
81 AssemblerBase::AssemblerBase(Isolate* isolate) | 83 AssemblerBase::AssemblerBase(Isolate* isolate) |
82 : isolate_(isolate), | 84 : isolate_(isolate), |
83 jit_cookie_(0) { | 85 jit_cookie_(0) { |
84 if (FLAG_mask_constants_with_cookie && isolate != NULL) { | 86 if (FLAG_mask_constants_with_cookie && isolate != NULL) { |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 const_cast<double*>(&DoubleConstant::uint8_max_value))); | 916 const_cast<double*>(&DoubleConstant::uint8_max_value))); |
915 } | 917 } |
916 | 918 |
917 | 919 |
918 ExternalReference ExternalReference::address_of_negative_infinity() { | 920 ExternalReference ExternalReference::address_of_negative_infinity() { |
919 return ExternalReference(reinterpret_cast<void*>( | 921 return ExternalReference(reinterpret_cast<void*>( |
920 const_cast<double*>(&DoubleConstant::negative_infinity))); | 922 const_cast<double*>(&DoubleConstant::negative_infinity))); |
921 } | 923 } |
922 | 924 |
923 | 925 |
924 ExternalReference ExternalReference::address_of_nan() { | 926 ExternalReference ExternalReference::address_of_canonical_non_hole_nan() { |
925 return ExternalReference(reinterpret_cast<void*>( | 927 return ExternalReference(reinterpret_cast<void*>( |
926 const_cast<double*>(&DoubleConstant::nan))); | 928 const_cast<double*>(&DoubleConstant::canonical_non_hole_nan))); |
927 } | 929 } |
928 | 930 |
929 | 931 |
| 932 ExternalReference ExternalReference::address_of_the_hole_nan() { |
| 933 return ExternalReference(reinterpret_cast<void*>( |
| 934 const_cast<double*>(&DoubleConstant::the_hole_nan))); |
| 935 } |
| 936 |
| 937 |
930 #ifndef V8_INTERPRETED_REGEXP | 938 #ifndef V8_INTERPRETED_REGEXP |
931 | 939 |
932 ExternalReference ExternalReference::re_check_stack_guard_state( | 940 ExternalReference ExternalReference::re_check_stack_guard_state( |
933 Isolate* isolate) { | 941 Isolate* isolate) { |
934 Address function; | 942 Address function; |
935 #ifdef V8_TARGET_ARCH_X64 | 943 #ifdef V8_TARGET_ARCH_X64 |
936 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 944 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
937 #elif V8_TARGET_ARCH_IA32 | 945 #elif V8_TARGET_ARCH_IA32 |
938 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 946 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
939 #elif V8_TARGET_ARCH_ARM | 947 #elif V8_TARGET_ARCH_ARM |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1206 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1199 state_.written_position = state_.current_position; | 1207 state_.written_position = state_.current_position; |
1200 written = true; | 1208 written = true; |
1201 } | 1209 } |
1202 | 1210 |
1203 // Return whether something was written. | 1211 // Return whether something was written. |
1204 return written; | 1212 return written; |
1205 } | 1213 } |
1206 | 1214 |
1207 } } // namespace v8::internal | 1215 } } // namespace v8::internal |
OLD | NEW |