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

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

Issue 14307013: - Remember the fact that an object has been added to the (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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DedupSet* current = DedupSets(); 50 DedupSet* current = DedupSets();
51 while (current != NULL) { 51 while (current != NULL) {
52 DedupSet* next = current->next(); 52 DedupSet* next = current->next();
53 delete current; 53 delete current;
54 current = next; 54 current = next;
55 } 55 }
56 } 56 }
57 57
58 58
59 bool StoreBuffer::AddPointerInternal(uword address) { 59 bool StoreBuffer::AddPointerInternal(uword address) {
60 RawObject* raw_obj = reinterpret_cast<RawObject*>(address);
61 ASSERT(raw_obj->IsRemembered());
60 ASSERT(dedup_sets_ != NULL); 62 ASSERT(dedup_sets_ != NULL);
61 ASSERT(Isolate::Current()->heap()->OldContains(address)); 63 ASSERT(Isolate::Current()->heap()->OldContains(address));
62 ASSERT((address & kSmiTagMask) != kSmiTag); 64 ASSERT((address & kSmiTagMask) != kSmiTag);
63 if (!dedup_sets_->set()->Add(address)) { 65 if (!dedup_sets_->set()->Add(address)) {
64 // Add a new DedupSet. 66 // Add a new DedupSet.
65 dedup_sets_ = new DedupSet(dedup_sets_); 67 dedup_sets_ = new DedupSet(dedup_sets_);
66 count_++; 68 count_++;
67 return true; 69 return true;
68 } 70 }
69 return false; 71 return false;
(...skipping 28 matching lines...) Expand all
98 } 100 }
99 101
100 102
101 void StoreBuffer::ProcessBlock(StoreBufferBlock* block) { 103 void StoreBuffer::ProcessBlock(StoreBufferBlock* block) {
102 if (DrainBlock(block)) { 104 if (DrainBlock(block)) {
103 CheckThreshold(); 105 CheckThreshold();
104 } 106 }
105 } 107 }
106 108
107 } // namespace dart 109 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698