| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 bool IsNew() const { return raw()->IsNewObject(); } | 228 bool IsNew() const { return raw()->IsNewObject(); } |
| 229 bool IsOld() const { return raw()->IsOldObject(); } | 229 bool IsOld() const { return raw()->IsOldObject(); } |
| 230 | 230 |
| 231 // Print the object on stdout for debugging. | 231 // Print the object on stdout for debugging. |
| 232 void Print() const; | 232 void Print() const; |
| 233 | 233 |
| 234 bool IsZoneHandle() const { | 234 bool IsZoneHandle() const { |
| 235 return VMHandles::IsZoneHandle(reinterpret_cast<uword>(this)); | 235 return VMHandles::IsZoneHandle(reinterpret_cast<uword>(this)); |
| 236 } | 236 } |
| 237 | 237 |
| 238 static RawObject* Clone(const Object& src, Heap::Space space = Heap::kNew); |
| 239 |
| 238 static Object& Handle(Isolate* isolate, RawObject* raw_ptr) { | 240 static Object& Handle(Isolate* isolate, RawObject* raw_ptr) { |
| 239 Object* obj = reinterpret_cast<Object*>(VMHandles::AllocateHandle(isolate)); | 241 Object* obj = reinterpret_cast<Object*>(VMHandles::AllocateHandle(isolate)); |
| 240 obj->SetRaw(raw_ptr); | 242 obj->SetRaw(raw_ptr); |
| 241 return *obj; | 243 return *obj; |
| 242 } | 244 } |
| 243 | 245 |
| 244 static Object& Handle() { | 246 static Object& Handle() { |
| 245 return Handle(Isolate::Current(), null_); | 247 return Handle(Isolate::Current(), null_); |
| 246 } | 248 } |
| 247 | 249 |
| (...skipping 4886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5134 } | 5136 } |
| 5135 | 5137 |
| 5136 | 5138 |
| 5137 intptr_t Stackmap::SizeInBits() const { | 5139 intptr_t Stackmap::SizeInBits() const { |
| 5138 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 5140 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 5139 } | 5141 } |
| 5140 | 5142 |
| 5141 } // namespace dart | 5143 } // namespace dart |
| 5142 | 5144 |
| 5143 #endif // VM_OBJECT_H_ | 5145 #endif // VM_OBJECT_H_ |
| OLD | NEW |