| 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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } \ | 71 } \ |
| 72 static object& CheckedHandle(RawObject* raw_ptr) { \ | 72 static object& CheckedHandle(RawObject* raw_ptr) { \ |
| 73 return CheckedHandle(Isolate::Current(), raw_ptr); \ | 73 return CheckedHandle(Isolate::Current(), raw_ptr); \ |
| 74 } \ | 74 } \ |
| 75 static object& ZoneHandle(Isolate* isolate, Raw##object* raw_ptr) { \ | 75 static object& ZoneHandle(Isolate* isolate, Raw##object* raw_ptr) { \ |
| 76 object* obj = reinterpret_cast<object*>( \ | 76 object* obj = reinterpret_cast<object*>( \ |
| 77 VMHandles::AllocateZoneHandle(isolate)); \ | 77 VMHandles::AllocateZoneHandle(isolate)); \ |
| 78 initializeHandle(obj, raw_ptr); \ | 78 initializeHandle(obj, raw_ptr); \ |
| 79 return *obj; \ | 79 return *obj; \ |
| 80 } \ | 80 } \ |
| 81 static object* ReadOnlyHandle(Isolate* isolate) { \ | 81 static object* ReadOnlyHandle() { \ |
| 82 object* obj = reinterpret_cast<object*>( \ | 82 object* obj = reinterpret_cast<object*>( \ |
| 83 Dart::AllocateReadOnlyHandle()); \ | 83 Dart::AllocateReadOnlyHandle()); \ |
| 84 initializeHandle(obj, object::null()); \ | 84 initializeHandle(obj, object::null()); \ |
| 85 return obj; \ | 85 return obj; \ |
| 86 } \ | 86 } \ |
| 87 static object& ZoneHandle() { \ | 87 static object& ZoneHandle() { \ |
| 88 return ZoneHandle(Isolate::Current(), object::null()); \ | 88 return ZoneHandle(Isolate::Current(), object::null()); \ |
| 89 } \ | 89 } \ |
| 90 static object& ZoneHandle(Raw##object* raw_ptr) { \ | 90 static object& ZoneHandle(Raw##object* raw_ptr) { \ |
| 91 return ZoneHandle(Isolate::Current(), raw_ptr); \ | 91 return ZoneHandle(Isolate::Current(), raw_ptr); \ |
| (...skipping 5728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5820 | 5820 |
| 5821 | 5821 |
| 5822 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5822 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 5823 intptr_t index) { | 5823 intptr_t index) { |
| 5824 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5824 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 5825 } | 5825 } |
| 5826 | 5826 |
| 5827 } // namespace dart | 5827 } // namespace dart |
| 5828 | 5828 |
| 5829 #endif // VM_OBJECT_H_ | 5829 #endif // VM_OBJECT_H_ |
| OLD | NEW |