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_HEAP_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
7 | 7 |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
10 | 10 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 #ifdef DEBUG | 323 #ifdef DEBUG |
324 if (slot >= reinterpret_cast<ObjectSlot>(NUMBER_OF_SLOT_TYPES)) { | 324 if (slot >= reinterpret_cast<ObjectSlot>(NUMBER_OF_SLOT_TYPES)) { |
325 DCHECK_NOT_NULL(*slot); | 325 DCHECK_NOT_NULL(*slot); |
326 } | 326 } |
327 #endif | 327 #endif |
328 slots_[idx_++] = slot; | 328 slots_[idx_++] = slot; |
329 } | 329 } |
330 | 330 |
331 enum SlotType { | 331 enum SlotType { |
332 EMBEDDED_OBJECT_SLOT, | 332 EMBEDDED_OBJECT_SLOT, |
333 OBJECT_SLOT, | |
334 RELOCATED_CODE_OBJECT, | 333 RELOCATED_CODE_OBJECT, |
335 CELL_TARGET_SLOT, | 334 CELL_TARGET_SLOT, |
336 CODE_TARGET_SLOT, | 335 CODE_TARGET_SLOT, |
337 CODE_ENTRY_SLOT, | 336 CODE_ENTRY_SLOT, |
338 DEBUG_TARGET_SLOT, | 337 DEBUG_TARGET_SLOT, |
339 JS_RETURN_SLOT, | 338 JS_RETURN_SLOT, |
340 NUMBER_OF_SLOT_TYPES | 339 NUMBER_OF_SLOT_TYPES |
341 }; | 340 }; |
342 | 341 |
343 static const char* SlotTypeToString(SlotType type) { | 342 static const char* SlotTypeToString(SlotType type) { |
344 switch (type) { | 343 switch (type) { |
345 case EMBEDDED_OBJECT_SLOT: | 344 case EMBEDDED_OBJECT_SLOT: |
346 return "EMBEDDED_OBJECT_SLOT"; | 345 return "EMBEDDED_OBJECT_SLOT"; |
347 case OBJECT_SLOT: | |
348 return "OBJECT_SLOT"; | |
349 case RELOCATED_CODE_OBJECT: | 346 case RELOCATED_CODE_OBJECT: |
350 return "RELOCATED_CODE_OBJECT"; | 347 return "RELOCATED_CODE_OBJECT"; |
351 case CELL_TARGET_SLOT: | 348 case CELL_TARGET_SLOT: |
352 return "CELL_TARGET_SLOT"; | 349 return "CELL_TARGET_SLOT"; |
353 case CODE_TARGET_SLOT: | 350 case CODE_TARGET_SLOT: |
354 return "CODE_TARGET_SLOT"; | 351 return "CODE_TARGET_SLOT"; |
355 case CODE_ENTRY_SLOT: | 352 case CODE_ENTRY_SLOT: |
356 return "CODE_ENTRY_SLOT"; | 353 return "CODE_ENTRY_SLOT"; |
357 case DEBUG_TARGET_SLOT: | 354 case DEBUG_TARGET_SLOT: |
358 return "DEBUG_TARGET_SLOT"; | 355 return "DEBUG_TARGET_SLOT"; |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 private: | 1018 private: |
1022 MarkCompactCollector* collector_; | 1019 MarkCompactCollector* collector_; |
1023 }; | 1020 }; |
1024 | 1021 |
1025 | 1022 |
1026 const char* AllocationSpaceName(AllocationSpace space); | 1023 const char* AllocationSpaceName(AllocationSpace space); |
1027 } | 1024 } |
1028 } // namespace v8::internal | 1025 } // namespace v8::internal |
1029 | 1026 |
1030 #endif // V8_HEAP_MARK_COMPACT_H_ | 1027 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |