| 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 | 725 |
| 726 // Return a TypeParameter if the type_name is a type parameter of this class. | 726 // Return a TypeParameter if the type_name is a type parameter of this class. |
| 727 // Return null otherwise. | 727 // Return null otherwise. |
| 728 RawTypeParameter* LookupTypeParameter(const String& type_name) const; | 728 RawTypeParameter* LookupTypeParameter(const String& type_name) const; |
| 729 | 729 |
| 730 // The type argument vector is flattened and includes the type arguments of | 730 // The type argument vector is flattened and includes the type arguments of |
| 731 // the super class. | 731 // the super class. |
| 732 bool HasTypeArguments() const; | 732 bool HasTypeArguments() const; |
| 733 intptr_t NumTypeArguments() const; | 733 intptr_t NumTypeArguments() const; |
| 734 | 734 |
| 735 // Return the number of type arguments that are specific to this class, i.e. |
| 736 // not overlapping with the type arguments of the super class of this class. |
| 737 intptr_t NumOwnTypeArguments() const; |
| 738 |
| 735 // If this class is parameterized, each instance has a type_arguments field. | 739 // If this class is parameterized, each instance has a type_arguments field. |
| 736 static const intptr_t kNoTypeArguments = -1; | 740 static const intptr_t kNoTypeArguments = -1; |
| 737 intptr_t type_arguments_field_offset() const { | 741 intptr_t type_arguments_field_offset() const { |
| 738 ASSERT(is_type_finalized() || is_prefinalized()); | 742 ASSERT(is_type_finalized() || is_prefinalized()); |
| 739 if (raw_ptr()->type_arguments_field_offset_in_words_ == kNoTypeArguments) { | 743 if (raw_ptr()->type_arguments_field_offset_in_words_ == kNoTypeArguments) { |
| 740 return kNoTypeArguments; | 744 return kNoTypeArguments; |
| 741 } | 745 } |
| 742 return raw_ptr()->type_arguments_field_offset_in_words_ * kWordSize; | 746 return raw_ptr()->type_arguments_field_offset_in_words_ * kWordSize; |
| 743 } | 747 } |
| 744 void set_type_arguments_field_offset(intptr_t value_in_bytes) const { | 748 void set_type_arguments_field_offset(intptr_t value_in_bytes) const { |
| (...skipping 5505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6250 | 6254 |
| 6251 | 6255 |
| 6252 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6256 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6253 intptr_t index) { | 6257 intptr_t index) { |
| 6254 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6258 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6255 } | 6259 } |
| 6256 | 6260 |
| 6257 } // namespace dart | 6261 } // namespace dart |
| 6258 | 6262 |
| 6259 #endif // VM_OBJECT_H_ | 6263 #endif // VM_OBJECT_H_ |
| OLD | NEW |