| 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 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 | 38 |
| 39 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) { | 39 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
| 40 return Handles<kVMHandleSizeInWords, | 40 return Handles<kVMHandleSizeInWords, |
| 41 kVMHandlesPerChunk, | 41 kVMHandlesPerChunk, |
| 42 kOffsetOfRawPtr>::VisitObjectPointers(visitor); | 42 kOffsetOfRawPtr>::VisitObjectPointers(visitor); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 uword VMHandles::AllocateHandle(Isolate* isolate) { | 46 uword VMHandles::AllocateHandle(Zone* zone) { |
| 47 return Handles<kVMHandleSizeInWords, | 47 return Handles<kVMHandleSizeInWords, |
| 48 kVMHandlesPerChunk, | 48 kVMHandlesPerChunk, |
| 49 kOffsetOfRawPtr>::AllocateHandle(isolate); | 49 kOffsetOfRawPtr>::AllocateHandle(zone); |
| 50 } | 50 } |
| 51 | 51 |
| 52 | 52 |
| 53 uword VMHandles::AllocateZoneHandle(Isolate* isolate) { | 53 uword VMHandles::AllocateZoneHandle(Zone* zone) { |
| 54 return Handles<kVMHandleSizeInWords, | 54 return Handles<kVMHandleSizeInWords, |
| 55 kVMHandlesPerChunk, | 55 kVMHandlesPerChunk, |
| 56 kOffsetOfRawPtr>::AllocateZoneHandle(isolate); | 56 kOffsetOfRawPtr>::AllocateZoneHandle(zone); |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 bool VMHandles::IsZoneHandle(uword handle) { | 60 bool VMHandles::IsZoneHandle(uword handle) { |
| 61 return Handles<kVMHandleSizeInWords, | 61 return Handles<kVMHandleSizeInWords, |
| 62 kVMHandlesPerChunk, | 62 kVMHandlesPerChunk, |
| 63 kOffsetOfRawPtr >::IsZoneHandle(handle); | 63 kOffsetOfRawPtr >::IsZoneHandle(handle); |
| 64 } | 64 } |
| 65 | 65 |
| 66 | 66 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 isolate()->IncrementNoHandleScopeDepth(); | 118 isolate()->IncrementNoHandleScopeDepth(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 NoHandleScope::~NoHandleScope() { | 122 NoHandleScope::~NoHandleScope() { |
| 123 isolate()->DecrementNoHandleScopeDepth(); | 123 isolate()->DecrementNoHandleScopeDepth(); |
| 124 } | 124 } |
| 125 #endif // defined(DEBUG) | 125 #endif // defined(DEBUG) |
| 126 | 126 |
| 127 } // namespace dart | 127 } // namespace dart |
| OLD | NEW |