| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 raw()->SetCreatedFromSnapshot(); | 267 raw()->SetCreatedFromSnapshot(); |
| 268 } | 268 } |
| 269 bool IsCanonical() const { | 269 bool IsCanonical() const { |
| 270 ASSERT(!IsNull()); | 270 ASSERT(!IsNull()); |
| 271 return raw()->IsCanonical(); | 271 return raw()->IsCanonical(); |
| 272 } | 272 } |
| 273 void SetCanonical() const { | 273 void SetCanonical() const { |
| 274 ASSERT(!IsNull()); | 274 ASSERT(!IsNull()); |
| 275 raw()->SetCanonical(); | 275 raw()->SetCanonical(); |
| 276 } | 276 } |
| 277 void ClearCanonical() const { |
| 278 ASSERT(!IsNull()); |
| 279 raw()->ClearCanonical(); |
| 280 } |
| 277 intptr_t GetClassId() const { | 281 intptr_t GetClassId() const { |
| 278 return !raw()->IsHeapObject() ? | 282 return !raw()->IsHeapObject() ? |
| 279 static_cast<intptr_t>(kSmiCid) : raw()->GetClassId(); | 283 static_cast<intptr_t>(kSmiCid) : raw()->GetClassId(); |
| 280 } | 284 } |
| 281 inline RawClass* clazz() const; | 285 inline RawClass* clazz() const; |
| 282 static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } | 286 static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } |
| 283 | 287 |
| 284 // Class testers. | 288 // Class testers. |
| 285 #define DEFINE_CLASS_TESTER(clazz) \ | 289 #define DEFINE_CLASS_TESTER(clazz) \ |
| 286 virtual bool Is##clazz() const { return false; } | 290 virtual bool Is##clazz() const { return false; } |
| (...skipping 7725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8012 | 8016 |
| 8013 | 8017 |
| 8014 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8018 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8015 intptr_t index) { | 8019 intptr_t index) { |
| 8016 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8020 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8017 } | 8021 } |
| 8018 | 8022 |
| 8019 } // namespace dart | 8023 } // namespace dart |
| 8020 | 8024 |
| 8021 #endif // VM_OBJECT_H_ | 8025 #endif // VM_OBJECT_H_ |
| OLD | NEW |