OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_HANDLES_H_ | 5 #ifndef VM_HANDLES_H_ |
6 #define VM_HANDLES_H_ | 6 #define VM_HANDLES_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 | 10 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 #endif | 230 #endif |
231 | 231 |
232 HandlesBlock* zone_blocks_; // List of zone handles. | 232 HandlesBlock* zone_blocks_; // List of zone handles. |
233 HandlesBlock first_scoped_block_; // First block of scoped handles. | 233 HandlesBlock first_scoped_block_; // First block of scoped handles. |
234 HandlesBlock* scoped_blocks_; // List of scoped handles. | 234 HandlesBlock* scoped_blocks_; // List of scoped handles. |
235 // Last block visited by VisitUnvisitedHandles. | 235 // Last block visited by VisitUnvisitedHandles. |
236 HandlesBlock* last_visited_block_; | 236 HandlesBlock* last_visited_block_; |
237 | 237 |
238 friend class HandleScope; | 238 friend class HandleScope; |
239 friend class Dart; | 239 friend class Dart; |
| 240 friend class ObjectStore; |
240 DISALLOW_ALLOCATION(); | 241 DISALLOW_ALLOCATION(); |
241 DISALLOW_COPY_AND_ASSIGN(Handles); | 242 DISALLOW_COPY_AND_ASSIGN(Handles); |
242 }; | 243 }; |
243 | 244 |
244 | 245 |
245 static const int kVMHandleSizeInWords = 2; | 246 static const int kVMHandleSizeInWords = 2; |
246 static const int kVMHandlesPerChunk = 64; | 247 static const int kVMHandlesPerChunk = 64; |
247 static const int kOffsetOfRawPtr = kWordSize; | 248 static const int kOffsetOfRawPtr = kWordSize; |
248 class VMHandles : public Handles<kVMHandleSizeInWords, | 249 class VMHandles : public Handles<kVMHandleSizeInWords, |
249 kVMHandlesPerChunk, | 250 kVMHandlesPerChunk, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 }; | 340 }; |
340 #endif // defined(DEBUG) | 341 #endif // defined(DEBUG) |
341 | 342 |
342 // Macro to start a no handles scope in the code. | 343 // Macro to start a no handles scope in the code. |
343 #define NOHANDLESCOPE(isolate) \ | 344 #define NOHANDLESCOPE(isolate) \ |
344 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); | 345 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); |
345 | 346 |
346 } // namespace dart | 347 } // namespace dart |
347 | 348 |
348 #endif // VM_HANDLES_H_ | 349 #endif // VM_HANDLES_H_ |
OLD | NEW |