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 #include "vm/os.h" | 10 #include "vm/os.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 void ZapFreeScopedHandles(); | 221 void ZapFreeScopedHandles(); |
222 #endif | 222 #endif |
223 | 223 |
224 HandlesBlock* zone_blocks_; // List of zone handles. | 224 HandlesBlock* zone_blocks_; // List of zone handles. |
225 HandlesBlock first_scoped_block_; // First block of scoped handles. | 225 HandlesBlock first_scoped_block_; // First block of scoped handles. |
226 HandlesBlock* scoped_blocks_; // List of scoped handles. | 226 HandlesBlock* scoped_blocks_; // List of scoped handles. |
227 | 227 |
228 friend class HandleScope; | 228 friend class HandleScope; |
229 friend class Dart; | 229 friend class Dart; |
230 friend class ObjectStore; | 230 friend class ObjectStore; |
| 231 friend class Isolate; |
231 DISALLOW_ALLOCATION(); | 232 DISALLOW_ALLOCATION(); |
232 DISALLOW_COPY_AND_ASSIGN(Handles); | 233 DISALLOW_COPY_AND_ASSIGN(Handles); |
233 }; | 234 }; |
234 | 235 |
235 | 236 |
236 static const int kVMHandleSizeInWords = 2; | 237 static const int kVMHandleSizeInWords = 2; |
237 static const int kVMHandlesPerChunk = 64; | 238 static const int kVMHandlesPerChunk = 64; |
238 static const int kOffsetOfRawPtr = kWordSize; | 239 static const int kOffsetOfRawPtr = kWordSize; |
239 class VMHandles : public Handles<kVMHandleSizeInWords, | 240 class VMHandles : public Handles<kVMHandleSizeInWords, |
240 kVMHandlesPerChunk, | 241 kVMHandlesPerChunk, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 explicit NoHandleScope(BaseIsolate* isolate) { } | 332 explicit NoHandleScope(BaseIsolate* isolate) { } |
332 NoHandleScope() { } | 333 NoHandleScope() { } |
333 ~NoHandleScope() { } | 334 ~NoHandleScope() { } |
334 | 335 |
335 private: | 336 private: |
336 DISALLOW_COPY_AND_ASSIGN(NoHandleScope); | 337 DISALLOW_COPY_AND_ASSIGN(NoHandleScope); |
337 }; | 338 }; |
338 #endif // defined(DEBUG) | 339 #endif // defined(DEBUG) |
339 | 340 |
340 // Macro to start a no handles scope in the code. | 341 // Macro to start a no handles scope in the code. |
341 #define NOHANDLESCOPE(isolate) \ | 342 #define NOHANDLESCOPE(isolate) \ |
342 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); | 343 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); |
343 | 344 |
344 } // namespace dart | 345 } // namespace dart |
345 | 346 |
346 #endif // VM_HANDLES_H_ | 347 #endif // VM_HANDLES_H_ |
OLD | NEW |