| 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
| 6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 kStoreBufferFullEvent, | 626 kStoreBufferFullEvent, |
| 627 kStoreBufferStartScanningPagesEvent, | 627 kStoreBufferStartScanningPagesEvent, |
| 628 kStoreBufferScanningPageEvent | 628 kStoreBufferScanningPageEvent |
| 629 } StoreBufferEvent; | 629 } StoreBufferEvent; |
| 630 | 630 |
| 631 | 631 |
| 632 typedef void (*StoreBufferCallback)(Heap* heap, | 632 typedef void (*StoreBufferCallback)(Heap* heap, |
| 633 MemoryChunk* page, | 633 MemoryChunk* page, |
| 634 StoreBufferEvent event); | 634 StoreBufferEvent event); |
| 635 | 635 |
| 636 | |
| 637 // Union used for fast testing of specific double values. | |
| 638 union DoubleRepresentation { | |
| 639 double value; | |
| 640 int64_t bits; | |
| 641 DoubleRepresentation(double x) { value = x; } | |
| 642 bool operator==(const DoubleRepresentation& other) const { | |
| 643 return bits == other.bits; | |
| 644 } | |
| 645 }; | |
| 646 | |
| 647 | |
| 648 // Union used for customized checking of the IEEE double types | 636 // Union used for customized checking of the IEEE double types |
| 649 // inlined within v8 runtime, rather than going to the underlying | 637 // inlined within v8 runtime, rather than going to the underlying |
| 650 // platform headers and libraries | 638 // platform headers and libraries |
| 651 union IeeeDoubleLittleEndianArchType { | 639 union IeeeDoubleLittleEndianArchType { |
| 652 double d; | 640 double d; |
| 653 struct { | 641 struct { |
| 654 unsigned int man_low :32; | 642 unsigned int man_low :32; |
| 655 unsigned int man_high :20; | 643 unsigned int man_high :20; |
| 656 unsigned int exp :11; | 644 unsigned int exp :11; |
| 657 unsigned int sign :1; | 645 unsigned int sign :1; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1103 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
| 1116 kPointerSizeLog2); | 1104 kPointerSizeLog2); |
| 1117 } | 1105 } |
| 1118 | 1106 |
| 1119 } // namespace internal | 1107 } // namespace internal |
| 1120 } // namespace v8 | 1108 } // namespace v8 |
| 1121 | 1109 |
| 1122 namespace i = v8::internal; | 1110 namespace i = v8::internal; |
| 1123 | 1111 |
| 1124 #endif // V8_GLOBALS_H_ | 1112 #endif // V8_GLOBALS_H_ |
| OLD | NEW |