| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #elif V8_TARGET_ARCH_MIPS | 58 #elif V8_TARGET_ARCH_MIPS |
| 59 #include "mips/regexp-macro-assembler-mips.h" | 59 #include "mips/regexp-macro-assembler-mips.h" |
| 60 #else // Unknown architecture. | 60 #else // Unknown architecture. |
| 61 #error "Unknown architecture." | 61 #error "Unknown architecture." |
| 62 #endif // Target architecture. | 62 #endif // Target architecture. |
| 63 #endif // V8_INTERPRETED_REGEXP | 63 #endif // V8_INTERPRETED_REGEXP |
| 64 | 64 |
| 65 namespace v8 { | 65 namespace v8 { |
| 66 namespace internal { | 66 namespace internal { |
| 67 | 67 |
| 68 static uint64_t kHoleNanUpper32AsInt64 = kHoleNanUpper32; |
| 69 static uint64_t kCanonicalNonHoleNanUpper32AsInt64 = |
| 70 kCanonicalNonHoleNanUpper32; |
| 71 |
| 72 uint64_t kHoleNanInt64 = (kHoleNanUpper32AsInt64 << 32) | kHoleNanLower32; |
| 73 uint64_t kCanonicalNonHoleNanInt64 = |
| 74 (kCanonicalNonHoleNanUpper32AsInt64 << 32) | kCanonicalNonHoleNanLower32; |
| 68 | 75 |
| 69 const double DoubleConstant::min_int = kMinInt; | 76 const double DoubleConstant::min_int = kMinInt; |
| 70 const double DoubleConstant::one_half = 0.5; | 77 const double DoubleConstant::one_half = 0.5; |
| 71 const double DoubleConstant::minus_zero = -0.0; | 78 const double DoubleConstant::minus_zero = -0.0; |
| 72 const double DoubleConstant::uint8_max_value = 255; | 79 const double DoubleConstant::uint8_max_value = 255; |
| 73 const double DoubleConstant::zero = 0.0; | 80 const double DoubleConstant::zero = 0.0; |
| 74 const double DoubleConstant::nan = OS::nan_value(); | 81 const double DoubleConstant::canonical_non_hole_nan = |
| 82 BitCast<double>(kCanonicalNonHoleNanInt64); |
| 83 const double DoubleConstant::the_hole_nan = BitCast<double>(kHoleNanInt64); |
| 75 const double DoubleConstant::negative_infinity = -V8_INFINITY; | 84 const double DoubleConstant::negative_infinity = -V8_INFINITY; |
| 76 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; | 85 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; |
| 77 | 86 |
| 78 // ----------------------------------------------------------------------------- | 87 // ----------------------------------------------------------------------------- |
| 79 // Implementation of AssemblerBase | 88 // Implementation of AssemblerBase |
| 80 | 89 |
| 81 AssemblerBase::AssemblerBase(Isolate* isolate) | 90 AssemblerBase::AssemblerBase(Isolate* isolate) |
| 82 : isolate_(isolate), | 91 : isolate_(isolate), |
| 83 jit_cookie_(0) { | 92 jit_cookie_(0) { |
| 84 if (FLAG_mask_constants_with_cookie && isolate != NULL) { | 93 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))); | 923 const_cast<double*>(&DoubleConstant::uint8_max_value))); |
| 915 } | 924 } |
| 916 | 925 |
| 917 | 926 |
| 918 ExternalReference ExternalReference::address_of_negative_infinity() { | 927 ExternalReference ExternalReference::address_of_negative_infinity() { |
| 919 return ExternalReference(reinterpret_cast<void*>( | 928 return ExternalReference(reinterpret_cast<void*>( |
| 920 const_cast<double*>(&DoubleConstant::negative_infinity))); | 929 const_cast<double*>(&DoubleConstant::negative_infinity))); |
| 921 } | 930 } |
| 922 | 931 |
| 923 | 932 |
| 924 ExternalReference ExternalReference::address_of_nan() { | 933 ExternalReference ExternalReference::address_of_canonical_non_hole_nan() { |
| 925 return ExternalReference(reinterpret_cast<void*>( | 934 return ExternalReference(reinterpret_cast<void*>( |
| 926 const_cast<double*>(&DoubleConstant::nan))); | 935 const_cast<double*>(&DoubleConstant::canonical_non_hole_nan))); |
| 927 } | 936 } |
| 928 | 937 |
| 929 | 938 |
| 939 ExternalReference ExternalReference::address_of_the_hole_nan() { |
| 940 return ExternalReference(reinterpret_cast<void*>( |
| 941 const_cast<double*>(&DoubleConstant::the_hole_nan))); |
| 942 } |
| 943 |
| 944 |
| 930 #ifndef V8_INTERPRETED_REGEXP | 945 #ifndef V8_INTERPRETED_REGEXP |
| 931 | 946 |
| 932 ExternalReference ExternalReference::re_check_stack_guard_state( | 947 ExternalReference ExternalReference::re_check_stack_guard_state( |
| 933 Isolate* isolate) { | 948 Isolate* isolate) { |
| 934 Address function; | 949 Address function; |
| 935 #ifdef V8_TARGET_ARCH_X64 | 950 #ifdef V8_TARGET_ARCH_X64 |
| 936 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 951 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
| 937 #elif V8_TARGET_ARCH_IA32 | 952 #elif V8_TARGET_ARCH_IA32 |
| 938 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 953 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
| 939 #elif V8_TARGET_ARCH_ARM | 954 #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); | 1213 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1199 state_.written_position = state_.current_position; | 1214 state_.written_position = state_.current_position; |
| 1200 written = true; | 1215 written = true; |
| 1201 } | 1216 } |
| 1202 | 1217 |
| 1203 // Return whether something was written. | 1218 // Return whether something was written. |
| 1204 return written; | 1219 return written; |
| 1205 } | 1220 } |
| 1206 | 1221 |
| 1207 } } // namespace v8::internal | 1222 } } // namespace v8::internal |
| OLD | NEW |