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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 return ExternalReference(reinterpret_cast<void*>(math_exp_log_table_array)); | 1354 return ExternalReference(reinterpret_cast<void*>(math_exp_log_table_array)); |
1355 } | 1355 } |
1356 | 1356 |
1357 | 1357 |
1358 ExternalReference ExternalReference::page_flags(Page* page) { | 1358 ExternalReference ExternalReference::page_flags(Page* page) { |
1359 return ExternalReference(reinterpret_cast<Address>(page) + | 1359 return ExternalReference(reinterpret_cast<Address>(page) + |
1360 MemoryChunk::kFlagsOffset); | 1360 MemoryChunk::kFlagsOffset); |
1361 } | 1361 } |
1362 | 1362 |
1363 | 1363 |
| 1364 ExternalReference ExternalReference::ForDeoptEntry(Address entry) { |
| 1365 return ExternalReference(entry); |
| 1366 } |
| 1367 |
| 1368 |
1364 // Helper function to compute x^y, where y is known to be an | 1369 // Helper function to compute x^y, where y is known to be an |
1365 // integer. Uses binary decomposition to limit the number of | 1370 // integer. Uses binary decomposition to limit the number of |
1366 // multiplications; see the discussion in "Hacker's Delight" by Henry | 1371 // multiplications; see the discussion in "Hacker's Delight" by Henry |
1367 // S. Warren, Jr., figure 11-6, page 213. | 1372 // S. Warren, Jr., figure 11-6, page 213. |
1368 double power_double_int(double x, int y) { | 1373 double power_double_int(double x, int y) { |
1369 double m = (y < 0) ? 1 / x : x; | 1374 double m = (y < 0) ? 1 / x : x; |
1370 unsigned n = (y < 0) ? -y : y; | 1375 unsigned n = (y < 0) ? -y : y; |
1371 double p = 1; | 1376 double p = 1; |
1372 while (n != 0) { | 1377 while (n != 0) { |
1373 if ((n & 1) != 0) p *= m; | 1378 if ((n & 1) != 0) p *= m; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1540 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1536 state_.written_position = state_.current_position; | 1541 state_.written_position = state_.current_position; |
1537 written = true; | 1542 written = true; |
1538 } | 1543 } |
1539 | 1544 |
1540 // Return whether something was written. | 1545 // Return whether something was written. |
1541 return written; | 1546 return written; |
1542 } | 1547 } |
1543 | 1548 |
1544 } } // namespace v8::internal | 1549 } } // namespace v8::internal |
OLD | NEW |