| OLD | NEW |
| 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 { |
| 11 | 11 |
| 12 DEFINE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate) { | 12 DEFINE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, 1, Isolate* isolate) { |
| 13 StoreBuffer* buffer = isolate->store_buffer(); | 13 StoreBuffer* buffer = isolate->store_buffer(); |
| 14 buffer->Expand(true); | 14 buffer->Expand(true); |
| 15 } | 15 } |
| 16 END_LEAF_RUNTIME_ENTRY | 16 END_LEAF_RUNTIME_ENTRY |
| 17 | 17 |
| 18 | 18 |
| 19 StoreBuffer::~StoreBuffer() { | 19 StoreBuffer::~StoreBuffer() { |
| 20 StoreBufferBlock* block = blocks_; | 20 StoreBufferBlock* block = blocks_; |
| 21 blocks_ = NULL; | 21 blocks_ = NULL; |
| 22 while (block != NULL) { | 22 while (block != NULL) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void StoreBuffer::CheckThreshold() { | 68 void StoreBuffer::CheckThreshold() { |
| 69 // Schedule an interrupt if we have run over the max number of | 69 // Schedule an interrupt if we have run over the max number of |
| 70 // StoreBufferBlocks. | 70 // StoreBufferBlocks. |
| 71 // TODO(iposva): Fix magic number. | 71 // TODO(iposva): Fix magic number. |
| 72 if (full_count_ > 100) { | 72 if (full_count_ > 100) { |
| 73 Isolate::Current()->ScheduleInterrupts(Isolate::kStoreBufferInterrupt); | 73 Isolate::Current()->ScheduleInterrupts(Isolate::kStoreBufferInterrupt); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace dart | 77 } // namespace dart |
| OLD | NEW |