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

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

Issue 2104073002: Remove invalid assertion in store buffer code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« 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) 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/lockers.h" 8 #include "vm/lockers.h"
9 #include "vm/runtime_entry.h" 9 #include "vm/runtime_entry.h"
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 98
99 void StoreBuffer::PushBlock(Block* block, ThresholdPolicy policy) { 99 void StoreBuffer::PushBlock(Block* block, ThresholdPolicy policy) {
100 BlockStack<Block::kSize>::PushBlockImpl(block); 100 BlockStack<Block::kSize>::PushBlockImpl(block);
101 if ((policy == kCheckThreshold) && Overflowed()) { 101 if ((policy == kCheckThreshold) && Overflowed()) {
102 MutexLocker ml(mutex_); 102 MutexLocker ml(mutex_);
103 Thread* thread = Thread::Current(); 103 Thread* thread = Thread::Current();
104 // Sanity check: it makes no sense to schedule the GC in another isolate. 104 // Sanity check: it makes no sense to schedule the GC in another isolate.
105 // (If Isolate ever gets multiple store buffers, we should avoid this 105 // (If Isolate ever gets multiple store buffers, we should avoid this
106 // coupling by passing in an explicit callback+parameter at construction.) 106 // coupling by passing in an explicit callback+parameter at construction.)
107 ASSERT(thread->isolate()->mutator_thread() == thread);
108 ASSERT(thread->isolate()->store_buffer() == this); 107 ASSERT(thread->isolate()->store_buffer() == this);
109 thread->ScheduleInterrupts(Thread::kVMInterrupt); 108 thread->ScheduleInterrupts(Thread::kVMInterrupt);
110 } 109 }
111 } 110 }
112 111
113 112
114 template<int BlockSize> 113 template<int BlockSize>
115 typename BlockStack<BlockSize>::Block* 114 typename BlockStack<BlockSize>::Block*
116 BlockStack<BlockSize>::PopNonFullBlock() { 115 BlockStack<BlockSize>::PopNonFullBlock() {
117 { 116 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 while (global_empty_->length() > kMaxGlobalEmpty) { 204 while (global_empty_->length() > kMaxGlobalEmpty) {
206 delete global_empty_->Pop(); 205 delete global_empty_->Pop();
207 } 206 }
208 } 207 }
209 208
210 209
211 template class BlockStack<kStoreBufferBlockSize>; 210 template class BlockStack<kStoreBufferBlockSize>;
212 template class BlockStack<kMarkingStackBlockSize>; 211 template class BlockStack<kMarkingStackBlockSize>;
213 212
214 } // namespace dart 213 } // 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