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 #ifndef VM_STORE_BUFFER_H_ | 5 #ifndef VM_STORE_BUFFER_H_ |
6 #define VM_STORE_BUFFER_H_ | 6 #define VM_STORE_BUFFER_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 StoreBufferBlock* next() const { return next_; } | 26 StoreBufferBlock* next() const { return next_; } |
27 | 27 |
28 intptr_t Count() const { return top_; } | 28 intptr_t Count() const { return top_; } |
29 | 29 |
30 RawObject* At(intptr_t i) const { | 30 RawObject* At(intptr_t i) const { |
31 ASSERT(i >= 0); | 31 ASSERT(i >= 0); |
32 ASSERT(i < top_); | 32 ASSERT(i < top_); |
33 return pointers_[i]; | 33 return pointers_[i]; |
34 } | 34 } |
35 | 35 |
36 static int top_offset() { return OFFSET_OF(StoreBufferBlock, top_); } | 36 static intptr_t top_offset() { return OFFSET_OF(StoreBufferBlock, top_); } |
37 static int pointers_offset() { | 37 static intptr_t pointers_offset() { |
38 return OFFSET_OF(StoreBufferBlock, pointers_); | 38 return OFFSET_OF(StoreBufferBlock, pointers_); |
39 } | 39 } |
40 | 40 |
41 private: | 41 private: |
42 StoreBufferBlock* next_; | 42 StoreBufferBlock* next_; |
43 int32_t top_; | 43 int32_t top_; |
44 RawObject* pointers_[kSize]; | 44 RawObject* pointers_[kSize]; |
45 | 45 |
46 friend class StoreBuffer; | 46 friend class StoreBuffer; |
47 | 47 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 StoreBufferBlock* blocks_; | 100 StoreBufferBlock* blocks_; |
101 intptr_t full_count_; | 101 intptr_t full_count_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(StoreBuffer); | 103 DISALLOW_COPY_AND_ASSIGN(StoreBuffer); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace dart | 106 } // namespace dart |
107 | 107 |
108 #endif // VM_STORE_BUFFER_H_ | 108 #endif // VM_STORE_BUFFER_H_ |
OLD | NEW |