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

Side by Side Diff: runtime/vm/scavenger.cc

Issue 10808067: - Do not try to determine the address of Smis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include "vm/dart.h" 7 #include "vm/dart.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 if (FLAG_verbose_gc) { 317 if (FLAG_verbose_gc) {
318 OS::PrintErr("StoreBuffer: %d, %d (entries, dups)\n", 318 OS::PrintErr("StoreBuffer: %d, %d (entries, dups)\n",
319 entries, duplicates); 319 entries, duplicates);
320 } 320 }
321 StoreBufferBlock* block = isolate->store_buffer_block(); 321 StoreBufferBlock* block = isolate->store_buffer_block();
322 entries = block->Count(); 322 entries = block->Count();
323 duplicates = 0; 323 duplicates = 0;
324 for (intptr_t i = 0; i < entries; i++) { 324 for (intptr_t i = 0; i < entries; i++) {
325 RawObject** pointer = reinterpret_cast<RawObject**>(block->At(i)); 325 RawObject** pointer = reinterpret_cast<RawObject**>(block->At(i));
326 if (from_->Contains(RawObject::ToAddr(*pointer))) { 326 RawObject* value = *pointer;
327 visitor->VisitPointer(pointer); 327 if (value->IsHeapObject()) {
328 } else { 328 if (from_->Contains(RawObject::ToAddr(value))) {
329 duplicates++; 329 visitor->VisitPointer(pointer);
330 } else {
331 duplicates++;
332 }
330 } 333 }
331 } 334 }
332 block->Reset(); 335 block->Reset();
333 if (FLAG_verbose_gc) { 336 if (FLAG_verbose_gc) {
334 OS::PrintErr("StoreBufferBlock: %d, %d (entries, dups)\n", 337 OS::PrintErr("StoreBufferBlock: %d, %d (entries, dups)\n",
335 entries, duplicates); 338 entries, duplicates);
336 } 339 }
337 // Done iterating through the store buffers. 340 // Done iterating through the store buffers.
338 visitor->VisitingOldPointers(false); 341 visitor->VisitingOldPointers(false);
339 } 342 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 OS::PrintErr(" done.\n"); 519 OS::PrintErr(" done.\n");
517 } 520 }
518 521
519 count_++; 522 count_++;
520 // Done scavenging. Reset the marker. 523 // Done scavenging. Reset the marker.
521 ASSERT(scavenging_); 524 ASSERT(scavenging_);
522 scavenging_ = false; 525 scavenging_ = false;
523 } 526 }
524 527
525 } // namespace dart 528 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698