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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 ASSERT(0 <= idx_ && idx_ < kNumberOfElements); | 313 ASSERT(0 <= idx_ && idx_ < kNumberOfElements); |
314 slots_[idx_++] = slot; | 314 slots_[idx_++] = slot; |
315 } | 315 } |
316 | 316 |
317 enum SlotType { | 317 enum SlotType { |
318 RELOCATED_CODE_OBJECT, | 318 RELOCATED_CODE_OBJECT, |
319 CODE_TARGET_SLOT, | 319 CODE_TARGET_SLOT, |
320 CODE_ENTRY_SLOT, | 320 CODE_ENTRY_SLOT, |
321 DEBUG_TARGET_SLOT, | 321 DEBUG_TARGET_SLOT, |
322 JS_RETURN_SLOT, | 322 JS_RETURN_SLOT, |
323 EMBEDDED_OBJECT_SLOT, | |
Vyacheslav Egorov (Chromium)
2011/10/12 14:21:53
micro opt idea: consider placing it first (or in t
Michael Starzinger
2011/10/12 15:38:36
Done. On both ia32 and x64 it is compiled as a loo
| |
323 NUMBER_OF_SLOT_TYPES | 324 NUMBER_OF_SLOT_TYPES |
324 }; | 325 }; |
325 | 326 |
326 void UpdateSlots(Heap* heap); | 327 void UpdateSlots(Heap* heap); |
327 | 328 |
328 void UpdateSlotsWithFilter(Heap* heap); | 329 void UpdateSlotsWithFilter(Heap* heap); |
329 | 330 |
330 SlotsBuffer* next() { return next_; } | 331 SlotsBuffer* next() { return next_; } |
331 | 332 |
332 static int SizeOfChain(SlotsBuffer* buffer) { | 333 static int SizeOfChain(SlotsBuffer* buffer) { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 // pointers to evacuated objects. | 534 // pointers to evacuated objects. |
534 if (page->owner()->identity() == OLD_DATA_SPACE) { | 535 if (page->owner()->identity() == OLD_DATA_SPACE) { |
535 evacuation_candidates_.RemoveElement(page); | 536 evacuation_candidates_.RemoveElement(page); |
536 } else { | 537 } else { |
537 page->SetFlag(Page::RESCAN_ON_EVACUATION); | 538 page->SetFlag(Page::RESCAN_ON_EVACUATION); |
538 } | 539 } |
539 } | 540 } |
540 | 541 |
541 void RecordRelocSlot(RelocInfo* rinfo, Code* target); | 542 void RecordRelocSlot(RelocInfo* rinfo, Code* target); |
542 void RecordCodeEntrySlot(Address slot, Code* target); | 543 void RecordCodeEntrySlot(Address slot, Code* target); |
544 void RecordEmbeddedSlot(RelocInfo* rinfo, Object* target); | |
543 | 545 |
544 INLINE(void RecordSlot(Object** anchor_slot, Object** slot, Object* object)); | 546 INLINE(void RecordSlot(Object** anchor_slot, Object** slot, Object* object)); |
545 | 547 |
546 void MigrateObject(Address dst, | 548 void MigrateObject(Address dst, |
547 Address src, | 549 Address src, |
548 int size, | 550 int size, |
549 AllocationSpace to_old_space); | 551 AllocationSpace to_old_space); |
550 | 552 |
551 bool TryPromoteObject(HeapObject* object, int object_size); | 553 bool TryPromoteObject(HeapObject* object, int object_size); |
552 | 554 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
784 | 786 |
785 friend class Heap; | 787 friend class Heap; |
786 }; | 788 }; |
787 | 789 |
788 | 790 |
789 const char* AllocationSpaceName(AllocationSpace space); | 791 const char* AllocationSpaceName(AllocationSpace space); |
790 | 792 |
791 } } // namespace v8::internal | 793 } } // namespace v8::internal |
792 | 794 |
793 #endif // V8_MARK_COMPACT_H_ | 795 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |