| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 if (slot >= reinterpret_cast<ObjectSlot>(NUMBER_OF_SLOT_TYPES)) { | 273 if (slot >= reinterpret_cast<ObjectSlot>(NUMBER_OF_SLOT_TYPES)) { |
| 274 DCHECK_NOT_NULL(*slot); | 274 DCHECK_NOT_NULL(*slot); |
| 275 } | 275 } |
| 276 #endif | 276 #endif |
| 277 slots_[idx_++] = slot; | 277 slots_[idx_++] = slot; |
| 278 } | 278 } |
| 279 | 279 |
| 280 enum SlotType { | 280 enum SlotType { |
| 281 EMBEDDED_OBJECT_SLOT, | 281 EMBEDDED_OBJECT_SLOT, |
| 282 RELOCATED_CODE_OBJECT, | 282 RELOCATED_CODE_OBJECT, |
| 283 CELL_TARGET_SLOT, |
| 283 CODE_TARGET_SLOT, | 284 CODE_TARGET_SLOT, |
| 284 CODE_ENTRY_SLOT, | 285 CODE_ENTRY_SLOT, |
| 285 DEBUG_TARGET_SLOT, | 286 DEBUG_TARGET_SLOT, |
| 286 JS_RETURN_SLOT, | 287 JS_RETURN_SLOT, |
| 287 NUMBER_OF_SLOT_TYPES | 288 NUMBER_OF_SLOT_TYPES |
| 288 }; | 289 }; |
| 289 | 290 |
| 290 static const char* SlotTypeToString(SlotType type) { | 291 static const char* SlotTypeToString(SlotType type) { |
| 291 switch (type) { | 292 switch (type) { |
| 292 case EMBEDDED_OBJECT_SLOT: | 293 case EMBEDDED_OBJECT_SLOT: |
| 293 return "EMBEDDED_OBJECT_SLOT"; | 294 return "EMBEDDED_OBJECT_SLOT"; |
| 294 case RELOCATED_CODE_OBJECT: | 295 case RELOCATED_CODE_OBJECT: |
| 295 return "RELOCATED_CODE_OBJECT"; | 296 return "RELOCATED_CODE_OBJECT"; |
| 297 case CELL_TARGET_SLOT: |
| 298 return "CELL_TARGET_SLOT"; |
| 296 case CODE_TARGET_SLOT: | 299 case CODE_TARGET_SLOT: |
| 297 return "CODE_TARGET_SLOT"; | 300 return "CODE_TARGET_SLOT"; |
| 298 case CODE_ENTRY_SLOT: | 301 case CODE_ENTRY_SLOT: |
| 299 return "CODE_ENTRY_SLOT"; | 302 return "CODE_ENTRY_SLOT"; |
| 300 case DEBUG_TARGET_SLOT: | 303 case DEBUG_TARGET_SLOT: |
| 301 return "DEBUG_TARGET_SLOT"; | 304 return "DEBUG_TARGET_SLOT"; |
| 302 case JS_RETURN_SLOT: | 305 case JS_RETURN_SLOT: |
| 303 return "JS_RETURN_SLOT"; | 306 return "JS_RETURN_SLOT"; |
| 304 case NUMBER_OF_SLOT_TYPES: | 307 case NUMBER_OF_SLOT_TYPES: |
| 305 return "NUMBER_OF_SLOT_TYPES"; | 308 return "NUMBER_OF_SLOT_TYPES"; |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 private: | 960 private: |
| 958 MarkCompactCollector* collector_; | 961 MarkCompactCollector* collector_; |
| 959 }; | 962 }; |
| 960 | 963 |
| 961 | 964 |
| 962 const char* AllocationSpaceName(AllocationSpace space); | 965 const char* AllocationSpaceName(AllocationSpace space); |
| 963 } | 966 } |
| 964 } // namespace v8::internal | 967 } // namespace v8::internal |
| 965 | 968 |
| 966 #endif // V8_HEAP_MARK_COMPACT_H_ | 969 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |