| 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 6652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6663 | 6663 |
| 6664 | 6664 |
| 6665 class UserTag : public Instance { | 6665 class UserTag : public Instance { |
| 6666 public: | 6666 public: |
| 6667 uword tag() const { return raw_ptr()->tag(); } | 6667 uword tag() const { return raw_ptr()->tag(); } |
| 6668 void set_tag(uword t) const { | 6668 void set_tag(uword t) const { |
| 6669 ASSERT(t >= UserTags::kUserTagIdOffset); | 6669 ASSERT(t >= UserTags::kUserTagIdOffset); |
| 6670 ASSERT(t < UserTags::kUserTagIdOffset + UserTags::kMaxUserTags); | 6670 ASSERT(t < UserTags::kUserTagIdOffset + UserTags::kMaxUserTags); |
| 6671 raw_ptr()->tag_ = t; | 6671 raw_ptr()->tag_ = t; |
| 6672 }; | 6672 }; |
| 6673 static intptr_t tag_offset() { return OFFSET_OF(RawUserTag, tag_); } |
| 6673 | 6674 |
| 6674 RawString* label() const { | 6675 RawString* label() const { |
| 6675 return raw_ptr()->label_; | 6676 return raw_ptr()->label_; |
| 6676 } | 6677 } |
| 6677 | 6678 |
| 6678 void MakeActive() const; | 6679 void MakeActive() const; |
| 6679 static void ClearActive(); | 6680 static void ClearActive(); |
| 6680 | 6681 |
| 6681 static intptr_t InstanceSize() { | 6682 static intptr_t InstanceSize() { |
| 6682 return RoundedAllocationSize(sizeof(RawUserTag)); | 6683 return RoundedAllocationSize(sizeof(RawUserTag)); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6834 | 6835 |
| 6835 | 6836 |
| 6836 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6837 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6837 intptr_t index) { | 6838 intptr_t index) { |
| 6838 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6839 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6839 } | 6840 } |
| 6840 | 6841 |
| 6841 } // namespace dart | 6842 } // namespace dart |
| 6842 | 6843 |
| 6843 #endif // VM_OBJECT_H_ | 6844 #endif // VM_OBJECT_H_ |
| OLD | NEW |