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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 | 1141 |
1142 // Check if this is the top level class. | 1142 // Check if this is the top level class. |
1143 bool IsTopLevel() const; | 1143 bool IsTopLevel() const; |
1144 | 1144 |
1145 bool IsPrivate() const; | 1145 bool IsPrivate() const; |
1146 | 1146 |
1147 RawArray* fields() const { return raw_ptr()->fields_; } | 1147 RawArray* fields() const { return raw_ptr()->fields_; } |
1148 void SetFields(const Array& value) const; | 1148 void SetFields(const Array& value) const; |
1149 void AddField(const Field& field) const; | 1149 void AddField(const Field& field) const; |
1150 void AddFields(const GrowableArray<const Field*>& fields) const; | 1150 void AddFields(const GrowableArray<const Field*>& fields) const; |
1151 intptr_t FindFieldIndex(const Field& field) const; | |
1152 RawField* FieldFromIndex(intptr_t idx) const; | |
1153 | 1151 |
1154 // Returns an array of all fields of this class and its superclasses indexed | 1152 // Returns an array of all fields of this class and its superclasses indexed |
1155 // by offset in words. | 1153 // by offset in words. |
1156 RawArray* OffsetToFieldMap() const; | 1154 RawArray* OffsetToFieldMap() const; |
1157 | 1155 |
1158 // Returns true if non-static fields are defined. | 1156 // Returns true if non-static fields are defined. |
1159 bool HasInstanceFields() const; | 1157 bool HasInstanceFields() const; |
1160 | 1158 |
1161 // TODO(koda): Unite w/ hash table. | 1159 // TODO(koda): Unite w/ hash table. |
1162 RawArray* functions() const { return raw_ptr()->functions_; } | 1160 RawArray* functions() const { return raw_ptr()->functions_; } |
(...skipping 7039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8202 | 8200 |
8203 | 8201 |
8204 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8202 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8205 intptr_t index) { | 8203 intptr_t index) { |
8206 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8204 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8207 } | 8205 } |
8208 | 8206 |
8209 } // namespace dart | 8207 } // namespace dart |
8210 | 8208 |
8211 #endif // VM_OBJECT_H_ | 8209 #endif // VM_OBJECT_H_ |
OLD | NEW |