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

Side by Side Diff: src/heap-inl.h

Issue 6542047: Basic implementation of incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 10 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 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 278
279 void Heap::RecordWrite(Address address, int offset) { 279 void Heap::RecordWrite(Address address, int offset) {
280 if (!InNewSpace(address)) StoreBuffer::Mark(address + offset); 280 if (!InNewSpace(address)) StoreBuffer::Mark(address + offset);
281 } 281 }
282 282
283 283
284 void Heap::RecordWrites(Address address, int start, int len) { 284 void Heap::RecordWrites(Address address, int start, int len) {
285 if (!InNewSpace(address)) { 285 if (!InNewSpace(address)) {
286 for (int i = 0; i < len; i += kPointerSize) { 286 for (int i = 0; i < len; i++) {
Erik Corry 2011/02/22 12:27:19 I'm an idiot!
287 StoreBuffer::Mark(address + start + i); 287 StoreBuffer::Mark(address + start + i*kPointerSize);
Erik Corry 2011/02/22 12:27:19 Spaces around *
288 } 288 }
289 } 289 }
290 } 290 }
291 291
292 292
293 OldSpace* Heap::TargetSpace(HeapObject* object) { 293 OldSpace* Heap::TargetSpace(HeapObject* object) {
294 InstanceType type = object->map()->instance_type(); 294 InstanceType type = object->map()->instance_type();
295 AllocationSpace space = TargetSpaceId(type); 295 AllocationSpace space = TargetSpaceId(type);
296 return (space == OLD_POINTER_SPACE) 296 return (space == OLD_POINTER_SPACE)
297 ? old_pointer_space_ 297 ? old_pointer_space_
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 572
573 void ExternalStringTable::ShrinkNewStrings(int position) { 573 void ExternalStringTable::ShrinkNewStrings(int position) {
574 new_space_strings_.Rewind(position); 574 new_space_strings_.Rewind(position);
575 Verify(); 575 Verify();
576 } 576 }
577 577
578 } } // namespace v8::internal 578 } } // namespace v8::internal
579 579
580 #endif // V8_HEAP_INL_H_ 580 #endif // V8_HEAP_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698