Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: src/mark-compact.h

Issue 8245007: Refactor how embedded pointers are visited. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/incremental-marking.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 ~SlotsBuffer() { 309 ~SlotsBuffer() {
310 } 310 }
311 311
312 void Add(ObjectSlot slot) { 312 void Add(ObjectSlot slot) {
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 EMBEDDED_OBJECT_SLOT,
318 RELOCATED_CODE_OBJECT, 319 RELOCATED_CODE_OBJECT,
319 CODE_TARGET_SLOT, 320 CODE_TARGET_SLOT,
320 CODE_ENTRY_SLOT, 321 CODE_ENTRY_SLOT,
321 DEBUG_TARGET_SLOT, 322 DEBUG_TARGET_SLOT,
322 JS_RETURN_SLOT, 323 JS_RETURN_SLOT,
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
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 // to other evacuation candidates thus we have to 532 // to other evacuation candidates thus we have to
532 // rescan the page after evacuation to discover and update all 533 // rescan the page after evacuation to discover and update all
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, Object* target);
542 void RecordCodeEntrySlot(Address slot, Code* target); 543 void RecordCodeEntrySlot(Address slot, Code* target);
543 544
544 INLINE(void RecordSlot(Object** anchor_slot, Object** slot, Object* object)); 545 INLINE(void RecordSlot(Object** anchor_slot, Object** slot, Object* object));
545 546
546 void MigrateObject(Address dst, 547 void MigrateObject(Address dst,
547 Address src, 548 Address src,
548 int size, 549 int size,
549 AllocationSpace to_old_space); 550 AllocationSpace to_old_space);
550 551
551 bool TryPromoteObject(HeapObject* object, int object_size); 552 bool TryPromoteObject(HeapObject* object, int object_size);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 785
785 friend class Heap; 786 friend class Heap;
786 }; 787 };
787 788
788 789
789 const char* AllocationSpaceName(AllocationSpace space); 790 const char* AllocationSpaceName(AllocationSpace space);
790 791
791 } } // namespace v8::internal 792 } } // namespace v8::internal
792 793
793 #endif // V8_MARK_COMPACT_H_ 794 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698