| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 return Handle(isolate->current_zone(), raw_ptr); | 331 return Handle(isolate->current_zone(), raw_ptr); |
| 332 } | 332 } |
| 333 static Object* ReadOnlyHandle() { | 333 static Object* ReadOnlyHandle() { |
| 334 Object* obj = reinterpret_cast<Object*>( | 334 Object* obj = reinterpret_cast<Object*>( |
| 335 Dart::AllocateReadOnlyHandle()); | 335 Dart::AllocateReadOnlyHandle()); |
| 336 initializeHandle(obj, Object::null()); | 336 initializeHandle(obj, Object::null()); |
| 337 return obj; | 337 return obj; |
| 338 } | 338 } |
| 339 | 339 |
| 340 static Object& Handle() { | 340 static Object& Handle() { |
| 341 return Handle(Isolate::Current(), null_); | 341 return Handle(Thread::Current()->zone(), null_); |
| 342 } | 342 } |
| 343 | 343 |
| 344 static Object& Handle(Zone* zone) { | 344 static Object& Handle(Zone* zone) { |
| 345 return Handle(zone, null_); | 345 return Handle(zone, null_); |
| 346 } | 346 } |
| 347 // DEPRECATED: Use Zone version. | 347 // DEPRECATED: Use Zone version. |
| 348 static Object& Handle(Isolate* isolate) { | 348 static Object& Handle(Isolate* isolate) { |
| 349 return Handle(isolate->current_zone(), null_); | 349 return Handle(isolate->current_zone(), null_); |
| 350 } | 350 } |
| 351 | 351 |
| 352 static Object& Handle(RawObject* raw_ptr) { | 352 static Object& Handle(RawObject* raw_ptr) { |
| 353 return Handle(Isolate::Current(), raw_ptr); | 353 return Handle(Thread::Current()->zone(), raw_ptr); |
| 354 } | 354 } |
| 355 | 355 |
| 356 static Object& ZoneHandle(Zone* zone, RawObject* raw_ptr) { | 356 static Object& ZoneHandle(Zone* zone, RawObject* raw_ptr) { |
| 357 Object* obj = reinterpret_cast<Object*>( | 357 Object* obj = reinterpret_cast<Object*>( |
| 358 VMHandles::AllocateZoneHandle(zone)); | 358 VMHandles::AllocateZoneHandle(zone)); |
| 359 initializeHandle(obj, raw_ptr); | 359 initializeHandle(obj, raw_ptr); |
| 360 return *obj; | 360 return *obj; |
| 361 } | 361 } |
| 362 | 362 |
| 363 static Object& ZoneHandle() { | 363 static Object& ZoneHandle() { |
| (...skipping 7665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8029 | 8029 |
| 8030 | 8030 |
| 8031 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8031 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8032 intptr_t index) { | 8032 intptr_t index) { |
| 8033 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8033 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8034 } | 8034 } |
| 8035 | 8035 |
| 8036 } // namespace dart | 8036 } // namespace dart |
| 8037 | 8037 |
| 8038 #endif // VM_OBJECT_H_ | 8038 #endif // VM_OBJECT_H_ |
| OLD | NEW |