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

Side by Side Diff: src/spaces-inl.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, 7 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/spaces.cc ('k') | test/cctest/test-disasm-ia32.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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 133
134 bool PagedSpace::Contains(Address addr) { 134 bool PagedSpace::Contains(Address addr) {
135 Page* p = Page::FromAddress(addr); 135 Page* p = Page::FromAddress(addr);
136 if (!p->is_valid()) return false; 136 if (!p->is_valid()) return false;
137 return p->owner() == this; 137 return p->owner() == this;
138 } 138 }
139 139
140 140
141 void MemoryChunk::set_scan_on_scavenge(bool scan) {
142 if (scan) {
143 if (!scan_on_scavenge_) heap_->increment_scan_on_scavenge_pages();
144 } else {
145 if (scan_on_scavenge_) heap_->decrement_scan_on_scavenge_pages();
146 }
147 scan_on_scavenge_ = scan;
148 }
149
150
141 MemoryChunk* MemoryChunk::FromAnyPointerAddress(Address addr) { 151 MemoryChunk* MemoryChunk::FromAnyPointerAddress(Address addr) {
142 MemoryChunk* maybe = reinterpret_cast<MemoryChunk*>( 152 MemoryChunk* maybe = reinterpret_cast<MemoryChunk*>(
143 OffsetFrom(addr) & ~Page::kPageAlignmentMask); 153 OffsetFrom(addr) & ~Page::kPageAlignmentMask);
144 if (maybe->owner() != NULL) return maybe; 154 if (maybe->owner() != NULL) return maybe;
145 // TODO(gc) ISOLATESMERGE HEAP 155 // TODO(gc) ISOLATESMERGE HEAP
146 LargeObjectIterator iterator(HEAP->lo_space()); 156 LargeObjectIterator iterator(HEAP->lo_space());
147 for (HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) { 157 for (HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) {
148 // Fixed arrays are the only pointer-containing objects in large object 158 // Fixed arrays are the only pointer-containing objects in large object
149 // space. 159 // space.
150 if (o->IsFixedArray()) { 160 if (o->IsFixedArray()) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool FreeListNode::IsFreeListNode(HeapObject* object) { 289 bool FreeListNode::IsFreeListNode(HeapObject* object) {
280 // TODO(gc) ISOLATES MERGE 290 // TODO(gc) ISOLATES MERGE
281 return object->map() == HEAP->raw_unchecked_free_space_map() 291 return object->map() == HEAP->raw_unchecked_free_space_map()
282 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map() 292 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map()
283 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map(); 293 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map();
284 } 294 }
285 295
286 } } // namespace v8::internal 296 } } // namespace v8::internal
287 297
288 #endif // V8_SPACES_INL_H_ 298 #endif // V8_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698