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

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

Issue 6824078: Move most of the incremental marking write barrier to generated code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (Heap::InNewSpace(addr)) { 68 if (Heap::InNewSpace(addr)) {
69 uint32_t index = Heap::new_space()->AddressToMarkbitIndex(addr); 69 uint32_t index = Heap::new_space()->AddressToMarkbitIndex(addr);
70 return new_space_bitmap_->MarkBitFromIndex(index); 70 return new_space_bitmap_->MarkBitFromIndex(index);
71 } else { 71 } else {
72 Page *p = Page::FromAddress(addr); 72 Page *p = Page::FromAddress(addr);
73 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr), 73 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr),
74 p->ContainsOnlyData()); 74 p->ContainsOnlyData());
75 } 75 }
76 } 76 }
77 77
78
Vyacheslav Egorov (Chromium) 2011/04/16 17:50:36 remove empty line
Erik Corry 2011/04/23 17:00:11 Done.
79 // For embedding in generated code.
80 static inline Address new_space_bitmap() {
81 return reinterpret_cast<Address>(new_space_bitmap_);
82 }
83
78 static void ClearRange(Address addr, int size) { 84 static void ClearRange(Address addr, int size) {
79 if (Heap::InNewSpace(addr)) { 85 if (Heap::InNewSpace(addr)) {
80 uint32_t index = Heap::new_space()->AddressToMarkbitIndex(addr); 86 uint32_t index = Heap::new_space()->AddressToMarkbitIndex(addr);
81 new_space_bitmap_->ClearRange(index, size >> kPointerSizeLog2); 87 new_space_bitmap_->ClearRange(index, size >> kPointerSizeLog2);
82 } else { 88 } else {
83 Page *p = Page::FromAddress(addr); 89 Page *p = Page::FromAddress(addr);
84 p->markbits()->ClearRange(p->FastAddressToMarkbitIndex(addr), 90 p->markbits()->ClearRange(p->FastAddressToMarkbitIndex(addr),
85 size >> kPointerSizeLog2); 91 size >> kPointerSizeLog2);
86 } 92 }
87 } 93 }
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 454
449 friend class UnmarkObjectVisitor; 455 friend class UnmarkObjectVisitor;
450 static void UnmarkObject(HeapObject* obj); 456 static void UnmarkObject(HeapObject* obj);
451 #endif 457 #endif
452 }; 458 };
453 459
454 460
455 } } // namespace v8::internal 461 } } // namespace v8::internal
456 462
457 #endif // V8_MARK_COMPACT_H_ 463 #endif // V8_MARK_COMPACT_H_
OLDNEW
« src/incremental-marking.h ('K') | « src/incremental-marking.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698