OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 enum SlotType { | 297 enum SlotType { |
298 EMBEDDED_OBJECT_SLOT, | 298 EMBEDDED_OBJECT_SLOT, |
299 RELOCATED_CODE_OBJECT, | 299 RELOCATED_CODE_OBJECT, |
300 CODE_TARGET_SLOT, | 300 CODE_TARGET_SLOT, |
301 CODE_ENTRY_SLOT, | 301 CODE_ENTRY_SLOT, |
302 DEBUG_TARGET_SLOT, | 302 DEBUG_TARGET_SLOT, |
303 JS_RETURN_SLOT, | 303 JS_RETURN_SLOT, |
304 NUMBER_OF_SLOT_TYPES | 304 NUMBER_OF_SLOT_TYPES |
305 }; | 305 }; |
306 | 306 |
| 307 static const char* SlotTypeToString(SlotType type) { |
| 308 switch (type) { |
| 309 case EMBEDDED_OBJECT_SLOT: |
| 310 return "EMBEDDED_OBJECT_SLOT"; |
| 311 case RELOCATED_CODE_OBJECT: |
| 312 return "RELOCATED_CODE_OBJECT"; |
| 313 case CODE_TARGET_SLOT: |
| 314 return "CODE_TARGET_SLOT"; |
| 315 case CODE_ENTRY_SLOT: |
| 316 return "CODE_ENTRY_SLOT"; |
| 317 case DEBUG_TARGET_SLOT: |
| 318 return "DEBUG_TARGET_SLOT"; |
| 319 case JS_RETURN_SLOT: |
| 320 return "JS_RETURN_SLOT"; |
| 321 case NUMBER_OF_SLOT_TYPES: |
| 322 return "NUMBER_OF_SLOT_TYPES"; |
| 323 } |
| 324 return "UNKNOWN SlotType"; |
| 325 } |
| 326 |
307 void UpdateSlots(Heap* heap); | 327 void UpdateSlots(Heap* heap); |
308 | 328 |
309 void UpdateSlotsWithFilter(Heap* heap); | 329 void UpdateSlotsWithFilter(Heap* heap); |
310 | 330 |
311 SlotsBuffer* next() { return next_; } | 331 SlotsBuffer* next() { return next_; } |
312 | 332 |
313 static int SizeOfChain(SlotsBuffer* buffer) { | 333 static int SizeOfChain(SlotsBuffer* buffer) { |
314 if (buffer == NULL) return 0; | 334 if (buffer == NULL) return 0; |
315 return static_cast<int>(buffer->idx_ + | 335 return static_cast<int>(buffer->idx_ + |
316 (buffer->chain_length_ - 1) * kNumberOfElements); | 336 (buffer->chain_length_ - 1) * kNumberOfElements); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 | 803 |
784 friend class Heap; | 804 friend class Heap; |
785 }; | 805 }; |
786 | 806 |
787 | 807 |
788 const char* AllocationSpaceName(AllocationSpace space); | 808 const char* AllocationSpaceName(AllocationSpace space); |
789 | 809 |
790 } } // namespace v8::internal | 810 } } // namespace v8::internal |
791 | 811 |
792 #endif // V8_MARK_COMPACT_H_ | 812 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |