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" |
11 #include "vm/json_stream.h" | 11 #include "vm/json_stream.h" |
12 #include "vm/bitmap.h" | 12 #include "vm/bitmap.h" |
13 #include "vm/dart.h" | 13 #include "vm/dart.h" |
14 #include "vm/globals.h" | 14 #include "vm/globals.h" |
| 15 #include "vm/growable_array.h" |
15 #include "vm/handles.h" | 16 #include "vm/handles.h" |
16 #include "vm/heap.h" | 17 #include "vm/heap.h" |
17 #include "vm/isolate.h" | 18 #include "vm/isolate.h" |
18 #include "vm/method_recognizer.h" | 19 #include "vm/method_recognizer.h" |
19 #include "vm/os.h" | 20 #include "vm/os.h" |
20 #include "vm/raw_object.h" | 21 #include "vm/raw_object.h" |
21 #include "vm/report.h" | 22 #include "vm/report.h" |
22 #include "vm/scanner.h" | 23 #include "vm/scanner.h" |
23 #include "vm/tags.h" | 24 #include "vm/tags.h" |
24 #include "vm/thread.h" | 25 #include "vm/thread.h" |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 } | 1141 } |
1141 | 1142 |
1142 // Check if this is the top level class. | 1143 // Check if this is the top level class. |
1143 bool IsTopLevel() const; | 1144 bool IsTopLevel() const; |
1144 | 1145 |
1145 bool IsPrivate() const; | 1146 bool IsPrivate() const; |
1146 | 1147 |
1147 RawArray* fields() const { return raw_ptr()->fields_; } | 1148 RawArray* fields() const { return raw_ptr()->fields_; } |
1148 void SetFields(const Array& value) const; | 1149 void SetFields(const Array& value) const; |
1149 void AddField(const Field& field) const; | 1150 void AddField(const Field& field) const; |
1150 void AddFields(const GrowableObjectArray& fields) const; | 1151 void AddFields(const GrowableArray<const Field*>& fields) const; |
1151 intptr_t FindFieldIndex(const Field& field) const; | 1152 intptr_t FindFieldIndex(const Field& field) const; |
1152 RawField* FieldFromIndex(intptr_t idx) const; | 1153 RawField* FieldFromIndex(intptr_t idx) const; |
1153 | 1154 |
1154 // Returns an array of all fields of this class and its superclasses indexed | 1155 // Returns an array of all fields of this class and its superclasses indexed |
1155 // by offset in words. | 1156 // by offset in words. |
1156 RawArray* OffsetToFieldMap() const; | 1157 RawArray* OffsetToFieldMap() const; |
1157 | 1158 |
1158 // Returns true if non-static fields are defined. | 1159 // Returns true if non-static fields are defined. |
1159 bool HasInstanceFields() const; | 1160 bool HasInstanceFields() const; |
1160 | 1161 |
(...skipping 6874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8035 | 8036 |
8036 | 8037 |
8037 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8038 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8038 intptr_t index) { | 8039 intptr_t index) { |
8039 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8040 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8040 } | 8041 } |
8041 | 8042 |
8042 } // namespace dart | 8043 } // namespace dart |
8043 | 8044 |
8044 #endif // VM_OBJECT_H_ | 8045 #endif // VM_OBJECT_H_ |
OLD | NEW |