| 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/handles.h" | 5 #include "vm/handles.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 | 37 |
| 38 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) { | 38 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
| 39 return Handles<kVMHandleSizeInWords, | 39 return Handles<kVMHandleSizeInWords, |
| 40 kVMHandlesPerChunk, | 40 kVMHandlesPerChunk, |
| 41 kOffsetOfRawPtr>::VisitObjectPointers(visitor); | 41 kOffsetOfRawPtr>::VisitObjectPointers(visitor); |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 uword VMHandles::AllocateHandle(Isolate* isolate) { | |
| 46 return Handles<kVMHandleSizeInWords, | |
| 47 kVMHandlesPerChunk, | |
| 48 kOffsetOfRawPtr>::AllocateHandle(isolate); | |
| 49 } | |
| 50 | |
| 51 | |
| 52 uword VMHandles::AllocateZoneHandle(Isolate* isolate) { | 45 uword VMHandles::AllocateZoneHandle(Isolate* isolate) { |
| 53 return Handles<kVMHandleSizeInWords, | 46 return Handles<kVMHandleSizeInWords, |
| 54 kVMHandlesPerChunk, | 47 kVMHandlesPerChunk, |
| 55 kOffsetOfRawPtr>::AllocateZoneHandle(isolate); | 48 kOffsetOfRawPtr>::AllocateZoneHandle(isolate); |
| 56 } | 49 } |
| 57 | 50 |
| 58 | 51 |
| 59 bool VMHandles::IsZoneHandle(uword handle) { | 52 bool VMHandles::IsZoneHandle(uword handle) { |
| 60 return Handles<kVMHandleSizeInWords, | 53 return Handles<kVMHandleSizeInWords, |
| 61 kVMHandlesPerChunk, | 54 kVMHandlesPerChunk, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 isolate()->IncrementNoHandleScopeDepth(); | 110 isolate()->IncrementNoHandleScopeDepth(); |
| 118 } | 111 } |
| 119 | 112 |
| 120 | 113 |
| 121 NoHandleScope::~NoHandleScope() { | 114 NoHandleScope::~NoHandleScope() { |
| 122 isolate()->DecrementNoHandleScopeDepth(); | 115 isolate()->DecrementNoHandleScopeDepth(); |
| 123 } | 116 } |
| 124 #endif // defined(DEBUG) | 117 #endif // defined(DEBUG) |
| 125 | 118 |
| 126 } // namespace dart | 119 } // namespace dart |
| OLD | NEW |