OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Should be a recognizable hex value tagged as a failure. | 72 // Should be a recognizable hex value tagged as a failure. |
73 #ifdef V8_HOST_ARCH_64_BIT | 73 #ifdef V8_HOST_ARCH_64_BIT |
74 const Address kZapValue = | 74 const Address kZapValue = |
75 reinterpret_cast<Address>(V8_UINT64_C(0xdeadbeedbeadbeef)); | 75 reinterpret_cast<Address>(V8_UINT64_C(0xdeadbeedbeadbeef)); |
76 const Address kHandleZapValue = | 76 const Address kHandleZapValue = |
77 reinterpret_cast<Address>(V8_UINT64_C(0x1baddead0baddeaf)); | 77 reinterpret_cast<Address>(V8_UINT64_C(0x1baddead0baddeaf)); |
78 const Address kFromSpaceZapValue = | 78 const Address kFromSpaceZapValue = |
79 reinterpret_cast<Address>(V8_UINT64_C(0x1beefdad0beefdaf)); | 79 reinterpret_cast<Address>(V8_UINT64_C(0x1beefdad0beefdaf)); |
80 const uint64_t kDebugZapValue = V8_UINT64_C(0xbadbaddbbadbaddb); | 80 const uint64_t kDebugZapValue = V8_UINT64_C(0xbadbaddbbadbaddb); |
81 const uint64_t kSlotsZapValue = V8_UINT64_C(0xbeefdeadbeefdeef); | 81 const uint64_t kSlotsZapValue = V8_UINT64_C(0xbeefdeadbeefdeef); |
| 82 const uint64_t kFreeListZapValue = 0xfeed1eaffeed1eaf; |
82 #else | 83 #else |
83 const Address kZapValue = reinterpret_cast<Address>(0xdeadbeef); | 84 const Address kZapValue = reinterpret_cast<Address>(0xdeadbeef); |
84 const Address kHandleZapValue = reinterpret_cast<Address>(0xbaddeaf); | 85 const Address kHandleZapValue = reinterpret_cast<Address>(0xbaddeaf); |
85 const Address kFromSpaceZapValue = reinterpret_cast<Address>(0xbeefdaf); | 86 const Address kFromSpaceZapValue = reinterpret_cast<Address>(0xbeefdaf); |
86 const uint32_t kSlotsZapValue = 0xbeefdeef; | 87 const uint32_t kSlotsZapValue = 0xbeefdeef; |
87 const uint32_t kDebugZapValue = 0xbadbaddb; | 88 const uint32_t kDebugZapValue = 0xbadbaddb; |
| 89 const uint32_t kFreeListZapValue = 0xfeed1eaf; |
88 #endif | 90 #endif |
89 | 91 |
90 | 92 |
91 // Number of bits to represent the page size for paged spaces. The value of 13 | 93 // Number of bits to represent the page size for paged spaces. The value of 20 |
92 // gives 8K bytes per page. | 94 // gives 1Mb bytes per page. |
93 const int kPageSizeBits = 13; | 95 const int kPageSizeBits = 20; |
94 | 96 |
95 // On Intel architecture, cache line size is 64 bytes. | 97 // On Intel architecture, cache line size is 64 bytes. |
96 // On ARM it may be less (32 bytes), but as far this constant is | 98 // On ARM it may be less (32 bytes), but as far this constant is |
97 // used for aligning data, it doesn't hurt to align on a greater value. | 99 // used for aligning data, it doesn't hurt to align on a greater value. |
98 const int kProcessorCacheLineSize = 64; | 100 const int kProcessorCacheLineSize = 64; |
99 | 101 |
100 // Constants relevant to double precision floating point numbers. | 102 // Constants relevant to double precision floating point numbers. |
101 | 103 |
102 // Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no | 104 // Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no |
103 // other bits set. | 105 // other bits set. |
(...skipping 20 matching lines...) Expand all Loading... |
124 class Debugger; | 126 class Debugger; |
125 class DebugInfo; | 127 class DebugInfo; |
126 class Descriptor; | 128 class Descriptor; |
127 class DescriptorArray; | 129 class DescriptorArray; |
128 class Expression; | 130 class Expression; |
129 class ExternalReference; | 131 class ExternalReference; |
130 class FixedArray; | 132 class FixedArray; |
131 class FunctionEntry; | 133 class FunctionEntry; |
132 class FunctionLiteral; | 134 class FunctionLiteral; |
133 class FunctionTemplateInfo; | 135 class FunctionTemplateInfo; |
| 136 class MemoryChunk; |
134 class NumberDictionary; | 137 class NumberDictionary; |
135 class StringDictionary; | 138 class StringDictionary; |
136 template <typename T> class Handle; | 139 template <typename T> class Handle; |
137 class Heap; | 140 class Heap; |
138 class HeapObject; | 141 class HeapObject; |
139 class IC; | 142 class IC; |
140 class InterceptorInfo; | 143 class InterceptorInfo; |
141 class IterationStatement; | 144 class IterationStatement; |
142 class JSArray; | 145 class JSArray; |
143 class JSFunction; | 146 class JSFunction; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 250 |
248 struct CodeDesc { | 251 struct CodeDesc { |
249 byte* buffer; | 252 byte* buffer; |
250 int buffer_size; | 253 int buffer_size; |
251 int instr_size; | 254 int instr_size; |
252 int reloc_size; | 255 int reloc_size; |
253 Assembler* origin; | 256 Assembler* origin; |
254 }; | 257 }; |
255 | 258 |
256 | 259 |
257 // Callback function on object slots, used for iterating heap object slots in | |
258 // HeapObjects, global pointers to heap objects, etc. The callback allows the | |
259 // callback function to change the value of the slot. | |
260 typedef void (*ObjectSlotCallback)(HeapObject** pointer); | |
261 | |
262 | |
263 // Callback function used for iterating objects in heap spaces, | 260 // Callback function used for iterating objects in heap spaces, |
264 // for example, scanning heap objects. | 261 // for example, scanning heap objects. |
265 typedef int (*HeapObjectCallback)(HeapObject* obj); | 262 typedef int (*HeapObjectCallback)(HeapObject* obj); |
266 | 263 |
267 | 264 |
268 // Callback function used for checking constraints when copying/relocating | 265 // Callback function used for checking constraints when copying/relocating |
269 // objects. Returns true if an object can be copied/relocated from its | 266 // objects. Returns true if an object can be copied/relocated from its |
270 // old_addr to a new_addr. | 267 // old_addr to a new_addr. |
271 typedef bool (*ConstraintCallback)(Address new_addr, Address old_addr); | 268 typedef bool (*ConstraintCallback)(Address new_addr, Address old_addr); |
272 | 269 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 RECEIVER_MIGHT_BE_IMPLICIT = 1 << 0 | 306 RECEIVER_MIGHT_BE_IMPLICIT = 1 << 0 |
310 }; | 307 }; |
311 | 308 |
312 | 309 |
313 enum InlineCacheHolderFlag { | 310 enum InlineCacheHolderFlag { |
314 OWN_MAP, // For fast properties objects. | 311 OWN_MAP, // For fast properties objects. |
315 PROTOTYPE_MAP // For slow properties objects (except GlobalObjects). | 312 PROTOTYPE_MAP // For slow properties objects (except GlobalObjects). |
316 }; | 313 }; |
317 | 314 |
318 | 315 |
| 316 // The Store Buffer (GC). |
| 317 typedef enum { |
| 318 kStoreBufferFullEvent, |
| 319 kStoreBufferStartScanningPagesEvent, |
| 320 kStoreBufferScanningPageEvent |
| 321 } StoreBufferEvent; |
| 322 |
| 323 |
| 324 typedef void (*StoreBufferCallback)(Heap* heap, |
| 325 MemoryChunk* page, |
| 326 StoreBufferEvent event); |
| 327 |
| 328 |
319 // Type of properties. | 329 // Type of properties. |
320 // Order of properties is significant. | 330 // Order of properties is significant. |
321 // Must fit in the BitField PropertyDetails::TypeField. | 331 // Must fit in the BitField PropertyDetails::TypeField. |
322 // A copy of this is in mirror-debugger.js. | 332 // A copy of this is in mirror-debugger.js. |
323 enum PropertyType { | 333 enum PropertyType { |
324 NORMAL = 0, // only in slow mode | 334 NORMAL = 0, // only in slow mode |
325 FIELD = 1, // only in fast mode | 335 FIELD = 1, // only in fast mode |
326 CONSTANT_FUNCTION = 2, // only in fast mode | 336 CONSTANT_FUNCTION = 2, // only in fast mode |
327 CALLBACKS = 3, | 337 CALLBACKS = 3, |
328 HANDLER = 4, // only in lookup results, not in descriptors | 338 HANDLER = 4, // only in lookup results, not in descriptors |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 static const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000; | 516 static const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000; |
507 | 517 |
508 const uint64_t kHoleNanInt64 = | 518 const uint64_t kHoleNanInt64 = |
509 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; | 519 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; |
510 const uint64_t kLastNonNaNInt64 = | 520 const uint64_t kLastNonNaNInt64 = |
511 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32); | 521 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32); |
512 | 522 |
513 } } // namespace v8::internal | 523 } } // namespace v8::internal |
514 | 524 |
515 #endif // V8_V8GLOBALS_H_ | 525 #endif // V8_V8GLOBALS_H_ |
OLD | NEW |