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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 namespace v8 { | 103 namespace v8 { |
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; |
112 double minus_one_half; | 113 double minus_one_half; |
113 double negative_infinity; | 114 double negative_infinity; |
114 double the_hole_nan; | 115 double the_hole_nan; |
115 double uint32_bias; | 116 double uint32_bias; |
116 }; | 117 }; |
117 | 118 |
118 static DoubleConstant double_constants; | 119 static DoubleConstant double_constants; |
119 | 120 |
120 const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; | 121 const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; |
121 | 122 |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 } | 944 } |
944 #endif // VERIFY_HEAP | 945 #endif // VERIFY_HEAP |
945 | 946 |
946 | 947 |
947 // ----------------------------------------------------------------------------- | 948 // ----------------------------------------------------------------------------- |
948 // Implementation of ExternalReference | 949 // Implementation of ExternalReference |
949 | 950 |
950 void ExternalReference::SetUp() { | 951 void ExternalReference::SetUp() { |
951 double_constants.min_int = kMinInt; | 952 double_constants.min_int = kMinInt; |
952 double_constants.one_half = 0.5; | 953 double_constants.one_half = 0.5; |
| 954 double_constants.minus_one = -1; |
953 double_constants.minus_one_half = -0.5; | 955 double_constants.minus_one_half = -0.5; |
954 double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64); | 956 double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64); |
955 double_constants.negative_infinity = -V8_INFINITY; | 957 double_constants.negative_infinity = -V8_INFINITY; |
956 double_constants.uint32_bias = | 958 double_constants.uint32_bias = |
957 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; | 959 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; |
958 | 960 |
959 math_exp_data_mutex = new base::Mutex(); | 961 math_exp_data_mutex = new base::Mutex(); |
960 } | 962 } |
961 | 963 |
962 | 964 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 return ExternalReference(reinterpret_cast<void*>(&double_constants.one_half)); | 1269 return ExternalReference(reinterpret_cast<void*>(&double_constants.one_half)); |
1268 } | 1270 } |
1269 | 1271 |
1270 | 1272 |
1271 ExternalReference ExternalReference::address_of_minus_one_half() { | 1273 ExternalReference ExternalReference::address_of_minus_one_half() { |
1272 return ExternalReference( | 1274 return ExternalReference( |
1273 reinterpret_cast<void*>(&double_constants.minus_one_half)); | 1275 reinterpret_cast<void*>(&double_constants.minus_one_half)); |
1274 } | 1276 } |
1275 | 1277 |
1276 | 1278 |
| 1279 ExternalReference ExternalReference::address_of_minus_one() { |
| 1280 return ExternalReference( |
| 1281 reinterpret_cast<void*>(&double_constants.minus_one)); |
| 1282 } |
| 1283 |
| 1284 |
1277 ExternalReference ExternalReference::address_of_negative_infinity() { | 1285 ExternalReference ExternalReference::address_of_negative_infinity() { |
1278 return ExternalReference( | 1286 return ExternalReference( |
1279 reinterpret_cast<void*>(&double_constants.negative_infinity)); | 1287 reinterpret_cast<void*>(&double_constants.negative_infinity)); |
1280 } | 1288 } |
1281 | 1289 |
1282 | 1290 |
1283 ExternalReference ExternalReference::address_of_the_hole_nan() { | 1291 ExternalReference ExternalReference::address_of_the_hole_nan() { |
1284 return ExternalReference( | 1292 return ExternalReference( |
1285 reinterpret_cast<void*>(&double_constants.the_hole_nan)); | 1293 reinterpret_cast<void*>(&double_constants.the_hole_nan)); |
1286 } | 1294 } |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 RecordRelocInfo(RelocInfo::JS_RETURN); | 1671 RecordRelocInfo(RelocInfo::JS_RETURN); |
1664 } | 1672 } |
1665 | 1673 |
1666 | 1674 |
1667 void Assembler::RecordDebugBreakSlot() { | 1675 void Assembler::RecordDebugBreakSlot() { |
1668 positions_recorder()->WriteRecordedPositions(); | 1676 positions_recorder()->WriteRecordedPositions(); |
1669 EnsureSpace ensure_space(this); | 1677 EnsureSpace ensure_space(this); |
1670 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | 1678 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); |
1671 } | 1679 } |
1672 } } // namespace v8::internal | 1680 } } // namespace v8::internal |
OLD | NEW |