| 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 virtual RawAbstractTypeArguments* InstantiateFrom( | 1202 virtual RawAbstractTypeArguments* InstantiateFrom( |
| 1203 const AbstractTypeArguments& instantiator_type_arguments, | 1203 const AbstractTypeArguments& instantiator_type_arguments, |
| 1204 Error* bound_error) const; | 1204 Error* bound_error) const; |
| 1205 | 1205 |
| 1206 // Do not clone InstantiatedTypeArguments or null vectors, since they are | 1206 // Do not clone InstantiatedTypeArguments or null vectors, since they are |
| 1207 // considered finalized. | 1207 // considered finalized. |
| 1208 virtual RawAbstractTypeArguments* CloneUnfinalized() const { | 1208 virtual RawAbstractTypeArguments* CloneUnfinalized() const { |
| 1209 return this->raw(); | 1209 return this->raw(); |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 // Do not canonicalize InstantiatedTypeArguments or null vectors. | 1212 // Null vectors are canonical. |
| 1213 virtual RawAbstractTypeArguments* Canonicalize() const { return this->raw(); } | 1213 virtual RawAbstractTypeArguments* Canonicalize() const { return this->raw(); } |
| 1214 | 1214 |
| 1215 // The name of this type argument vector, e.g. "<T, dynamic, List<T>, Smi>". | 1215 // The name of this type argument vector, e.g. "<T, dynamic, List<T>, Smi>". |
| 1216 virtual RawString* Name() const { | 1216 virtual RawString* Name() const { |
| 1217 return SubvectorName(0, Length(), kInternalName); | 1217 return SubvectorName(0, Length(), kInternalName); |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 // The name of this type argument vector, e.g. "<T, dynamic, List<T>, int>". | 1220 // The name of this type argument vector, e.g. "<T, dynamic, List<T>, int>". |
| 1221 // Names of internal classes are mapped to their public interfaces. | 1221 // Names of internal classes are mapped to their public interfaces. |
| 1222 virtual RawString* UserVisibleName() const { | 1222 virtual RawString* UserVisibleName() const { |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 virtual bool IsUninstantiatedIdentity() const { | 1376 virtual bool IsUninstantiatedIdentity() const { |
| 1377 UNREACHABLE(); | 1377 UNREACHABLE(); |
| 1378 return false; | 1378 return false; |
| 1379 } | 1379 } |
| 1380 virtual bool CanShareInstantiatorTypeArguments( | 1380 virtual bool CanShareInstantiatorTypeArguments( |
| 1381 const Class& instantiator_class) const { | 1381 const Class& instantiator_class) const { |
| 1382 UNREACHABLE(); | 1382 UNREACHABLE(); |
| 1383 return false; | 1383 return false; |
| 1384 } | 1384 } |
| 1385 virtual bool IsBounded() const { return false; } // Bounds were checked. | 1385 virtual bool IsBounded() const { return false; } // Bounds were checked. |
| 1386 virtual RawAbstractTypeArguments* Canonicalize() const; |
| 1386 | 1387 |
| 1387 RawAbstractTypeArguments* uninstantiated_type_arguments() const { | 1388 RawAbstractTypeArguments* uninstantiated_type_arguments() const { |
| 1388 return raw_ptr()->uninstantiated_type_arguments_; | 1389 return raw_ptr()->uninstantiated_type_arguments_; |
| 1389 } | 1390 } |
| 1390 static intptr_t uninstantiated_type_arguments_offset() { | 1391 static intptr_t uninstantiated_type_arguments_offset() { |
| 1391 return OFFSET_OF(RawInstantiatedTypeArguments, | 1392 return OFFSET_OF(RawInstantiatedTypeArguments, |
| 1392 uninstantiated_type_arguments_); | 1393 uninstantiated_type_arguments_); |
| 1393 } | 1394 } |
| 1394 | 1395 |
| 1395 RawAbstractTypeArguments* instantiator_type_arguments() const { | 1396 RawAbstractTypeArguments* instantiator_type_arguments() const { |
| (...skipping 5167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6563 | 6564 |
| 6564 | 6565 |
| 6565 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6566 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6566 intptr_t index) { | 6567 intptr_t index) { |
| 6567 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6568 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6568 } | 6569 } |
| 6569 | 6570 |
| 6570 } // namespace dart | 6571 } // namespace dart |
| 6571 | 6572 |
| 6572 #endif // VM_OBJECT_H_ | 6573 #endif // VM_OBJECT_H_ |
| OLD | NEW |