| 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 735 |
| 736 RawLibrary* library() const { return raw_ptr()->library_; } | 736 RawLibrary* library() const { return raw_ptr()->library_; } |
| 737 void set_library(const Library& value) const; | 737 void set_library(const Library& value) const; |
| 738 | 738 |
| 739 // The type parameters (and their bounds) are specified as an array of | 739 // The type parameters (and their bounds) are specified as an array of |
| 740 // TypeParameter. | 740 // TypeParameter. |
| 741 RawTypeArguments* type_parameters() const { | 741 RawTypeArguments* type_parameters() const { |
| 742 return raw_ptr()->type_parameters_; | 742 return raw_ptr()->type_parameters_; |
| 743 } | 743 } |
| 744 void set_type_parameters(const TypeArguments& value) const; | 744 void set_type_parameters(const TypeArguments& value) const; |
| 745 intptr_t NumTypeParameters() const; | 745 intptr_t NumTypeParameters(Isolate* isolate) const; |
| 746 intptr_t NumTypeParameters() const { |
| 747 return NumTypeParameters(Isolate::Current()); |
| 748 } |
| 746 static intptr_t type_parameters_offset() { | 749 static intptr_t type_parameters_offset() { |
| 747 return OFFSET_OF(RawClass, type_parameters_); | 750 return OFFSET_OF(RawClass, type_parameters_); |
| 748 } | 751 } |
| 749 | 752 |
| 750 // Return a TypeParameter if the type_name is a type parameter of this class. | 753 // Return a TypeParameter if the type_name is a type parameter of this class. |
| 751 // Return null otherwise. | 754 // Return null otherwise. |
| 752 RawTypeParameter* LookupTypeParameter(const String& type_name) const; | 755 RawTypeParameter* LookupTypeParameter(const String& type_name) const; |
| 753 | 756 |
| 754 // The type argument vector is flattened and includes the type arguments of | 757 // The type argument vector is flattened and includes the type arguments of |
| 755 // the super class. | 758 // the super class. |
| (...skipping 5909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6665 | 6668 |
| 6666 | 6669 |
| 6667 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6670 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6668 intptr_t index) { | 6671 intptr_t index) { |
| 6669 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6672 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6670 } | 6673 } |
| 6671 | 6674 |
| 6672 } // namespace dart | 6675 } // namespace dart |
| 6673 | 6676 |
| 6674 #endif // VM_OBJECT_H_ | 6677 #endif // VM_OBJECT_H_ |
| OLD | NEW |