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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 | 989 |
990 ExternalReference ExternalReference::isolate_address(Isolate* isolate) { | 990 ExternalReference ExternalReference::isolate_address(Isolate* isolate) { |
991 return ExternalReference(isolate); | 991 return ExternalReference(isolate); |
992 } | 992 } |
993 | 993 |
994 | 994 |
995 ExternalReference::ExternalReference(const IC_Utility& ic_utility, | 995 ExternalReference::ExternalReference(const IC_Utility& ic_utility, |
996 Isolate* isolate) | 996 Isolate* isolate) |
997 : address_(Redirect(isolate, ic_utility.address())) {} | 997 : address_(Redirect(isolate, ic_utility.address())) {} |
998 | 998 |
999 ExternalReference::ExternalReference(const Debug_Address& debug_address, | |
1000 Isolate* isolate) | |
1001 : address_(debug_address.address(isolate)) {} | |
1002 | 999 |
1003 ExternalReference::ExternalReference(StatsCounter* counter) | 1000 ExternalReference::ExternalReference(StatsCounter* counter) |
1004 : address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {} | 1001 : address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {} |
1005 | 1002 |
1006 | 1003 |
1007 ExternalReference::ExternalReference(Isolate::AddressId id, Isolate* isolate) | 1004 ExternalReference::ExternalReference(Isolate::AddressId id, Isolate* isolate) |
1008 : address_(isolate->get_address_from_id(id)) {} | 1005 : address_(isolate->get_address_from_id(id)) {} |
1009 | 1006 |
1010 | 1007 |
1011 ExternalReference::ExternalReference(const SCTableReference& table_ref) | 1008 ExternalReference::ExternalReference(const SCTableReference& table_ref) |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 return ExternalReference(entry); | 1421 return ExternalReference(entry); |
1425 } | 1422 } |
1426 | 1423 |
1427 | 1424 |
1428 ExternalReference ExternalReference::cpu_features() { | 1425 ExternalReference ExternalReference::cpu_features() { |
1429 ASSERT(CpuFeatures::initialized_); | 1426 ASSERT(CpuFeatures::initialized_); |
1430 return ExternalReference(&CpuFeatures::supported_); | 1427 return ExternalReference(&CpuFeatures::supported_); |
1431 } | 1428 } |
1432 | 1429 |
1433 | 1430 |
| 1431 ExternalReference ExternalReference::debug_after_break_target_address( |
| 1432 Isolate* isolate) { |
| 1433 return ExternalReference(isolate->debug()->after_break_target_address()); |
| 1434 } |
| 1435 |
| 1436 |
| 1437 ExternalReference |
| 1438 ExternalReference::debug_restarter_frame_function_pointer_address( |
| 1439 Isolate* isolate) { |
| 1440 return ExternalReference( |
| 1441 isolate->debug()->restarter_frame_function_pointer_address()); |
| 1442 } |
| 1443 |
| 1444 |
1434 double power_helper(double x, double y) { | 1445 double power_helper(double x, double y) { |
1435 int y_int = static_cast<int>(y); | 1446 int y_int = static_cast<int>(y); |
1436 if (y == y_int) { | 1447 if (y == y_int) { |
1437 return power_double_int(x, y_int); // Returns 1 if exponent is 0. | 1448 return power_double_int(x, y_int); // Returns 1 if exponent is 0. |
1438 } | 1449 } |
1439 if (y == 0.5) { | 1450 if (y == 0.5) { |
1440 return (std::isinf(x)) ? V8_INFINITY | 1451 return (std::isinf(x)) ? V8_INFINITY |
1441 : fast_sqrt(x + 0.0); // Convert -0 to +0. | 1452 : fast_sqrt(x + 0.0); // Convert -0 to +0. |
1442 } | 1453 } |
1443 if (y == -0.5) { | 1454 if (y == -0.5) { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 r2 = r2 - ad; | 1646 r2 = r2 - ad; |
1636 } | 1647 } |
1637 delta = ad - r2; | 1648 delta = ad - r2; |
1638 } while (q1 < delta || (q1 == delta && r1 == 0)); | 1649 } while (q1 < delta || (q1 == delta && r1 == 0)); |
1639 int32_t mul = static_cast<int32_t>(q2 + 1); | 1650 int32_t mul = static_cast<int32_t>(q2 + 1); |
1640 multiplier_ = (d < 0) ? -mul : mul; | 1651 multiplier_ = (d < 0) ? -mul : mul; |
1641 shift_ = p - 32; | 1652 shift_ = p - 32; |
1642 } | 1653 } |
1643 | 1654 |
1644 } } // namespace v8::internal | 1655 } } // namespace v8::internal |
OLD | NEW |