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

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

Issue 13406004: - Remember objects (not addresses) in the old generation containing new pointers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« runtime/vm/object.cc ('K') | « runtime/vm/scavenger.cc ('k') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/store_buffer.h" 5 #include "vm/store_buffer.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/runtime_entry.h" 8 #include "vm/runtime_entry.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 DedupSet* next = current->next(); 57 DedupSet* next = current->next();
58 delete current; 58 delete current;
59 current = next; 59 current = next;
60 } 60 }
61 } 61 }
62 62
63 63
64 void StoreBuffer::AddPointer(uword address) { 64 void StoreBuffer::AddPointer(uword address) {
65 ASSERT(dedup_sets_ != NULL); 65 ASSERT(dedup_sets_ != NULL);
66 ASSERT(Isolate::Current()->heap()->OldContains(address)); 66 ASSERT(Isolate::Current()->heap()->OldContains(address));
67 ASSERT((address & kSmiTagMask) != kSmiTag);
67 if (!dedup_sets_->set()->Add(address)) { 68 if (!dedup_sets_->set()->Add(address)) {
68 // Add a new DedupSet. Schedule an interrupt if we have run over the max 69 // Add a new DedupSet. Schedule an interrupt if we have run over the max
69 // number of DedupSets. 70 // number of DedupSets.
70 dedup_sets_ = new DedupSet(dedup_sets_); 71 dedup_sets_ = new DedupSet(dedup_sets_);
71 count_++; 72 count_++;
72 // TODO(iposva): Fix magic number. 73 // TODO(iposva): Fix magic number.
73 if (count_ > 100) { 74 if (count_ > 100) {
74 Isolate::Current()->ScheduleInterrupts(Isolate::kStoreBufferInterrupt); 75 Isolate::Current()->ScheduleInterrupts(Isolate::kStoreBufferInterrupt);
75 } 76 }
76 } 77 }
77 } 78 }
78 79
79 } // namespace dart 80 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/scavenger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698