| 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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 RawFunction* LookupFunction(const String& name) const; | 1194 RawFunction* LookupFunction(const String& name) const; |
| 1195 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 1195 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
| 1196 RawFunction* LookupGetterFunction(const String& name) const; | 1196 RawFunction* LookupGetterFunction(const String& name) const; |
| 1197 RawFunction* LookupSetterFunction(const String& name) const; | 1197 RawFunction* LookupSetterFunction(const String& name) const; |
| 1198 RawField* LookupInstanceField(const String& name) const; | 1198 RawField* LookupInstanceField(const String& name) const; |
| 1199 RawField* LookupStaticField(const String& name) const; | 1199 RawField* LookupStaticField(const String& name) const; |
| 1200 RawField* LookupField(const String& name) const; | 1200 RawField* LookupField(const String& name) const; |
| 1201 | 1201 |
| 1202 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; | 1202 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; |
| 1203 | 1203 |
| 1204 // Returns an instance of Double or Double::null(). |
| 1205 // 'index' points to either: |
| 1206 // - constants_list_ position of found element, or |
| 1207 // - constants_list_ position where new canonical can be inserted. |
| 1208 RawDouble* LookupCanonicalDouble(Zone* zone, |
| 1209 double value, intptr_t* index) const; |
| 1210 RawMint* LookupCanonicalMint(Zone* zone, |
| 1211 int64_t value, intptr_t* index) const; |
| 1212 RawBigint* LookupCanonicalBigint(Zone* zone, |
| 1213 const Bigint& value, intptr_t* index) const; |
| 1214 // The methods above are more efficient than this generic one. |
| 1215 RawInstance* LookupCanonicalInstance(Zone* zone, |
| 1216 const Instance& value, |
| 1217 intptr_t* index) const; |
| 1218 |
| 1204 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; | 1219 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; |
| 1205 | 1220 |
| 1206 intptr_t FindCanonicalTypeIndex(const AbstractType& needle) const; | 1221 intptr_t FindCanonicalTypeIndex(const AbstractType& needle) const; |
| 1207 RawAbstractType* CanonicalTypeFromIndex(intptr_t idx) const; | 1222 RawAbstractType* CanonicalTypeFromIndex(intptr_t idx) const; |
| 1208 | 1223 |
| 1209 static intptr_t InstanceSize() { | 1224 static intptr_t InstanceSize() { |
| 1210 return RoundedAllocationSize(sizeof(RawClass)); | 1225 return RoundedAllocationSize(sizeof(RawClass)); |
| 1211 } | 1226 } |
| 1212 | 1227 |
| 1213 bool is_implemented() const { | 1228 bool is_implemented() const { |
| (...skipping 7264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8478 | 8493 |
| 8479 | 8494 |
| 8480 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8495 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8481 intptr_t index) { | 8496 intptr_t index) { |
| 8482 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8497 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8483 } | 8498 } |
| 8484 | 8499 |
| 8485 } // namespace dart | 8500 } // namespace dart |
| 8486 | 8501 |
| 8487 #endif // VM_OBJECT_H_ | 8502 #endif // VM_OBJECT_H_ |
| OLD | NEW |