| 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 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| 11 void StoreBufferBlock::ProcessBuffer() { | 11 void StoreBufferBlock::ProcessBuffer() { |
| 12 // TODO(iposva): Do the right thing for store buffer overflow. | 12 // TODO(iposva): Do the right thing for store buffer overflow. |
| 13 top_ = 0; // Currently just reset back to the beginning. | 13 top_ = 0; // Currently just reset back to the beginning. |
| 14 } | 14 } |
| 15 | 15 |
| 16 |
| 17 bool StoreBufferBlock::Contains(uword pointer) { |
| 18 for (int32_t i = 0; i < top_; i++) { |
| 19 if (pointers_[i] == pointer) { |
| 20 return true; |
| 21 } |
| 22 } |
| 23 return false; |
| 24 } |
| 25 |
| 16 } // namespace dart | 26 } // namespace dart |
| OLD | NEW |