| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 namespace internal { | 104 namespace internal { |
| 105 | 105 |
| 106 // ----------------------------------------------------------------------------- | 106 // ----------------------------------------------------------------------------- |
| 107 // Common double constants. | 107 // Common double constants. |
| 108 | 108 |
| 109 struct DoubleConstant BASE_EMBEDDED { | 109 struct DoubleConstant BASE_EMBEDDED { |
| 110 double min_int; | 110 double min_int; |
| 111 double one_half; | 111 double one_half; |
| 112 double minus_one_half; | 112 double minus_one_half; |
| 113 double negative_infinity; | 113 double negative_infinity; |
| 114 double canonical_non_hole_nan; | |
| 115 double the_hole_nan; | 114 double the_hole_nan; |
| 116 double uint32_bias; | 115 double uint32_bias; |
| 117 }; | 116 }; |
| 118 | 117 |
| 119 static DoubleConstant double_constants; | 118 static DoubleConstant double_constants; |
| 120 | 119 |
| 121 const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; | 120 const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; |
| 122 | 121 |
| 123 static bool math_exp_data_initialized = false; | 122 static bool math_exp_data_initialized = false; |
| 124 static base::Mutex* math_exp_data_mutex = NULL; | 123 static base::Mutex* math_exp_data_mutex = NULL; |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 #endif // VERIFY_HEAP | 880 #endif // VERIFY_HEAP |
| 882 | 881 |
| 883 | 882 |
| 884 // ----------------------------------------------------------------------------- | 883 // ----------------------------------------------------------------------------- |
| 885 // Implementation of ExternalReference | 884 // Implementation of ExternalReference |
| 886 | 885 |
| 887 void ExternalReference::SetUp() { | 886 void ExternalReference::SetUp() { |
| 888 double_constants.min_int = kMinInt; | 887 double_constants.min_int = kMinInt; |
| 889 double_constants.one_half = 0.5; | 888 double_constants.one_half = 0.5; |
| 890 double_constants.minus_one_half = -0.5; | 889 double_constants.minus_one_half = -0.5; |
| 891 double_constants.canonical_non_hole_nan = base::OS::nan_value(); | |
| 892 double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64); | 890 double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64); |
| 893 double_constants.negative_infinity = -V8_INFINITY; | 891 double_constants.negative_infinity = -V8_INFINITY; |
| 894 double_constants.uint32_bias = | 892 double_constants.uint32_bias = |
| 895 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; | 893 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; |
| 896 | 894 |
| 897 math_exp_data_mutex = new base::Mutex(); | 895 math_exp_data_mutex = new base::Mutex(); |
| 898 } | 896 } |
| 899 | 897 |
| 900 | 898 |
| 901 void ExternalReference::InitializeMathExpData() { | 899 void ExternalReference::InitializeMathExpData() { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 reinterpret_cast<void*>(&double_constants.minus_one_half)); | 1237 reinterpret_cast<void*>(&double_constants.minus_one_half)); |
| 1240 } | 1238 } |
| 1241 | 1239 |
| 1242 | 1240 |
| 1243 ExternalReference ExternalReference::address_of_negative_infinity() { | 1241 ExternalReference ExternalReference::address_of_negative_infinity() { |
| 1244 return ExternalReference( | 1242 return ExternalReference( |
| 1245 reinterpret_cast<void*>(&double_constants.negative_infinity)); | 1243 reinterpret_cast<void*>(&double_constants.negative_infinity)); |
| 1246 } | 1244 } |
| 1247 | 1245 |
| 1248 | 1246 |
| 1249 ExternalReference ExternalReference::address_of_canonical_non_hole_nan() { | |
| 1250 return ExternalReference( | |
| 1251 reinterpret_cast<void*>(&double_constants.canonical_non_hole_nan)); | |
| 1252 } | |
| 1253 | |
| 1254 | |
| 1255 ExternalReference ExternalReference::address_of_the_hole_nan() { | 1247 ExternalReference ExternalReference::address_of_the_hole_nan() { |
| 1256 return ExternalReference( | 1248 return ExternalReference( |
| 1257 reinterpret_cast<void*>(&double_constants.the_hole_nan)); | 1249 reinterpret_cast<void*>(&double_constants.the_hole_nan)); |
| 1258 } | 1250 } |
| 1259 | 1251 |
| 1260 | 1252 |
| 1261 ExternalReference ExternalReference::address_of_uint32_bias() { | 1253 ExternalReference ExternalReference::address_of_uint32_bias() { |
| 1262 return ExternalReference( | 1254 return ExternalReference( |
| 1263 reinterpret_cast<void*>(&double_constants.uint32_bias)); | 1255 reinterpret_cast<void*>(&double_constants.uint32_bias)); |
| 1264 } | 1256 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1596 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1588 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1597 state_.written_position = state_.current_position; | 1589 state_.written_position = state_.current_position; |
| 1598 written = true; | 1590 written = true; |
| 1599 } | 1591 } |
| 1600 | 1592 |
| 1601 // Return whether something was written. | 1593 // Return whether something was written. |
| 1602 return written; | 1594 return written; |
| 1603 } | 1595 } |
| 1604 | 1596 |
| 1605 } } // namespace v8::internal | 1597 } } // namespace v8::internal |
| OLD | NEW |