| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_UTILS_H_ | 5 #ifndef V8_UTILS_H_ |
| 6 #define V8_UTILS_H_ | 6 #define V8_UTILS_H_ |
| 7 | 7 |
| 8 #include <limits.h> | 8 #include <limits.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 size_t size) { | 513 size_t size) { |
| 514 memmove(dest, src, size); | 514 memmove(dest, src, size); |
| 515 } | 515 } |
| 516 const int kMinComplexMemCopy = 8; | 516 const int kMinComplexMemCopy = 8; |
| 517 #endif // V8_TARGET_ARCH_IA32 | 517 #endif // V8_TARGET_ARCH_IA32 |
| 518 | 518 |
| 519 | 519 |
| 520 // ---------------------------------------------------------------------------- | 520 // ---------------------------------------------------------------------------- |
| 521 // Miscellaneous | 521 // Miscellaneous |
| 522 | 522 |
| 523 // Memory offset for lower and higher bits in a 64 bit integer. |
| 524 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 525 static const int kInt64LowerHalfMemoryOffset = 0; |
| 526 static const int kInt64UpperHalfMemoryOffset = 4; |
| 527 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 528 static const int kInt64LowerHalfMemoryOffset = 4; |
| 529 static const int kInt64UpperHalfMemoryOffset = 0; |
| 530 #endif // V8_TARGET_LITTLE_ENDIAN |
| 531 |
| 523 // A static resource holds a static instance that can be reserved in | 532 // A static resource holds a static instance that can be reserved in |
| 524 // a local scope using an instance of Access. Attempts to re-reserve | 533 // a local scope using an instance of Access. Attempts to re-reserve |
| 525 // the instance will cause an error. | 534 // the instance will cause an error. |
| 526 template <typename T> | 535 template <typename T> |
| 527 class StaticResource { | 536 class StaticResource { |
| 528 public: | 537 public: |
| 529 StaticResource() : is_reserved_(false) {} | 538 StaticResource() : is_reserved_(false) {} |
| 530 | 539 |
| 531 private: | 540 private: |
| 532 template <typename S> friend class Access; | 541 template <typename S> friend class Access; |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 private: | 1726 private: |
| 1718 T value_; | 1727 T value_; |
| 1719 ThreadedListZoneEntry<T>* next_; | 1728 ThreadedListZoneEntry<T>* next_; |
| 1720 DISALLOW_COPY_AND_ASSIGN(ThreadedListZoneEntry); | 1729 DISALLOW_COPY_AND_ASSIGN(ThreadedListZoneEntry); |
| 1721 }; | 1730 }; |
| 1722 | 1731 |
| 1723 } // namespace internal | 1732 } // namespace internal |
| 1724 } // namespace v8 | 1733 } // namespace v8 |
| 1725 | 1734 |
| 1726 #endif // V8_UTILS_H_ | 1735 #endif // V8_UTILS_H_ |
| OLD | NEW |