| 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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
| 6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 bool IsTopLevel() const; | 1121 bool IsTopLevel() const; |
| 1122 | 1122 |
| 1123 bool IsPrivate() const; | 1123 bool IsPrivate() const; |
| 1124 | 1124 |
| 1125 // Returns an array of instance and static fields defined by this class. | 1125 // Returns an array of instance and static fields defined by this class. |
| 1126 RawArray* fields() const { return raw_ptr()->fields_; } | 1126 RawArray* fields() const { return raw_ptr()->fields_; } |
| 1127 void SetFields(const Array& value) const; | 1127 void SetFields(const Array& value) const; |
| 1128 void AddField(const Field& field) const; | 1128 void AddField(const Field& field) const; |
| 1129 void AddFields(const GrowableArray<const Field*>& fields) const; | 1129 void AddFields(const GrowableArray<const Field*>& fields) const; |
| 1130 | 1130 |
| 1131 void InjectCIDFields() const; |
| 1132 |
| 1131 // Returns an array of all instance fields of this class and its superclasses | 1133 // Returns an array of all instance fields of this class and its superclasses |
| 1132 // indexed by offset in words. | 1134 // indexed by offset in words. |
| 1133 // |original_classes| only has an effect when reloading. If true and we | 1135 // |original_classes| only has an effect when reloading. If true and we |
| 1134 // are reloading, it will prefer the original classes to the replacement | 1136 // are reloading, it will prefer the original classes to the replacement |
| 1135 // classes. | 1137 // classes. |
| 1136 RawArray* OffsetToFieldMap(bool original_classes = false) const; | 1138 RawArray* OffsetToFieldMap(bool original_classes = false) const; |
| 1137 | 1139 |
| 1138 // Returns true if non-static fields are defined. | 1140 // Returns true if non-static fields are defined. |
| 1139 bool HasInstanceFields() const; | 1141 bool HasInstanceFields() const; |
| 1140 | 1142 |
| (...skipping 7774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8915 | 8917 |
| 8916 inline void TypeArguments::SetHash(intptr_t value) const { | 8918 inline void TypeArguments::SetHash(intptr_t value) const { |
| 8917 // This is only safe because we create a new Smi, which does not cause | 8919 // This is only safe because we create a new Smi, which does not cause |
| 8918 // heap allocation. | 8920 // heap allocation. |
| 8919 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8921 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
| 8920 } | 8922 } |
| 8921 | 8923 |
| 8922 } // namespace dart | 8924 } // namespace dart |
| 8923 | 8925 |
| 8924 #endif // RUNTIME_VM_OBJECT_H_ | 8926 #endif // RUNTIME_VM_OBJECT_H_ |
| OLD | NEW |