| 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 void operator=(RawObject* value) { | 697 void operator=(RawObject* value) { |
| 698 raw_ = value; | 698 raw_ = value; |
| 699 } | 699 } |
| 700 void operator^=(RawObject* value) { | 700 void operator^=(RawObject* value) { |
| 701 raw_ = value; | 701 raw_ = value; |
| 702 } | 702 } |
| 703 static PassiveObject& Handle(Isolate* I, RawObject* raw_ptr) { | 703 static PassiveObject& Handle(Isolate* I, RawObject* raw_ptr) { |
| 704 PassiveObject* obj = | 704 PassiveObject* obj = |
| 705 reinterpret_cast<PassiveObject*>(VMHandles::AllocateHandle(I)); | 705 reinterpret_cast<PassiveObject*>(VMHandles::AllocateHandle(I)); |
| 706 obj->raw_ = raw_ptr; | 706 obj->raw_ = raw_ptr; |
| 707 obj->set_vtable(NULL); | 707 obj->set_vtable(0); |
| 708 return *obj; | 708 return *obj; |
| 709 } | 709 } |
| 710 static PassiveObject& Handle(RawObject* raw_ptr) { | 710 static PassiveObject& Handle(RawObject* raw_ptr) { |
| 711 return Handle(Isolate::Current(), raw_ptr); | 711 return Handle(Isolate::Current(), raw_ptr); |
| 712 } | 712 } |
| 713 static PassiveObject& Handle() { | 713 static PassiveObject& Handle() { |
| 714 return Handle(Isolate::Current(), Object::null()); | 714 return Handle(Isolate::Current(), Object::null()); |
| 715 } | 715 } |
| 716 static PassiveObject& Handle(Isolate* I) { | 716 static PassiveObject& Handle(Isolate* I) { |
| 717 return Handle(I, Object::null()); | 717 return Handle(I, Object::null()); |
| 718 } | 718 } |
| 719 static PassiveObject& ZoneHandle(Isolate* I, RawObject* raw_ptr) { | 719 static PassiveObject& ZoneHandle(Isolate* I, RawObject* raw_ptr) { |
| 720 PassiveObject* obj = reinterpret_cast<PassiveObject*>( | 720 PassiveObject* obj = reinterpret_cast<PassiveObject*>( |
| 721 VMHandles::AllocateZoneHandle(I)); | 721 VMHandles::AllocateZoneHandle(I)); |
| 722 obj->raw_ = raw_ptr; | 722 obj->raw_ = raw_ptr; |
| 723 obj->set_vtable(NULL); | 723 obj->set_vtable(0); |
| 724 return *obj; | 724 return *obj; |
| 725 } | 725 } |
| 726 static PassiveObject& ZoneHandle(RawObject* raw_ptr) { | 726 static PassiveObject& ZoneHandle(RawObject* raw_ptr) { |
| 727 return ZoneHandle(Isolate::Current(), raw_ptr); | 727 return ZoneHandle(Isolate::Current(), raw_ptr); |
| 728 } | 728 } |
| 729 static PassiveObject& ZoneHandle() { | 729 static PassiveObject& ZoneHandle() { |
| 730 return ZoneHandle(Isolate::Current(), Object::null()); | 730 return ZoneHandle(Isolate::Current(), Object::null()); |
| 731 } | 731 } |
| 732 static PassiveObject& ZoneHandle(Isolate* I) { | 732 static PassiveObject& ZoneHandle(Isolate* I) { |
| 733 return ZoneHandle(I, Object::null()); | 733 return ZoneHandle(I, Object::null()); |
| (...skipping 6675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7409 | 7409 |
| 7410 | 7410 |
| 7411 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7411 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7412 intptr_t index) { | 7412 intptr_t index) { |
| 7413 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7413 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7414 } | 7414 } |
| 7415 | 7415 |
| 7416 } // namespace dart | 7416 } // namespace dart |
| 7417 | 7417 |
| 7418 #endif // VM_OBJECT_H_ | 7418 #endif // VM_OBJECT_H_ |
| OLD | NEW |