| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 kVMHandlesPerChunk, | 244 kVMHandlesPerChunk, |
| 245 kOffsetOfRawPtr> { | 245 kOffsetOfRawPtr> { |
| 246 public: | 246 public: |
| 247 static const int kOffsetOfRawPtrInHandle = kOffsetOfRawPtr; | 247 static const int kOffsetOfRawPtrInHandle = kOffsetOfRawPtr; |
| 248 | 248 |
| 249 VMHandles() : Handles<kVMHandleSizeInWords, | 249 VMHandles() : Handles<kVMHandleSizeInWords, |
| 250 kVMHandlesPerChunk, | 250 kVMHandlesPerChunk, |
| 251 kOffsetOfRawPtr>() { | 251 kOffsetOfRawPtr>() { |
| 252 #ifdef DEBUG | 252 #ifdef DEBUG |
| 253 if (FLAG_trace_handles) { | 253 if (FLAG_trace_handles) { |
| 254 OS::PrintErr("*** Starting a new VM handle block 0x%"Px"\n", | 254 OS::PrintErr("*** Starting a new VM handle block 0x%" Px "\n", |
| 255 reinterpret_cast<intptr_t>(this)); | 255 reinterpret_cast<intptr_t>(this)); |
| 256 } | 256 } |
| 257 #endif | 257 #endif |
| 258 } | 258 } |
| 259 ~VMHandles(); | 259 ~VMHandles(); |
| 260 | 260 |
| 261 // Visit all object pointers stored in the various handles. | 261 // Visit all object pointers stored in the various handles. |
| 262 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 262 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 263 | 263 |
| 264 // Allocates a handle in the current handle scope. This handle is valid only | 264 // Allocates a handle in the current handle scope. This handle is valid only |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 }; | 341 }; |
| 342 #endif // defined(DEBUG) | 342 #endif // defined(DEBUG) |
| 343 | 343 |
| 344 // Macro to start a no handles scope in the code. | 344 // Macro to start a no handles scope in the code. |
| 345 #define NOHANDLESCOPE(isolate) \ | 345 #define NOHANDLESCOPE(isolate) \ |
| 346 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); | 346 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); |
| 347 | 347 |
| 348 } // namespace dart | 348 } // namespace dart |
| 349 | 349 |
| 350 #endif // VM_HANDLES_H_ | 350 #endif // VM_HANDLES_H_ |
| OLD | NEW |