| 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 3735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3746 RawType* GetType() const; | 3746 RawType* GetType() const; |
| 3747 | 3747 |
| 3748 virtual RawAbstractTypeArguments* GetTypeArguments() const; | 3748 virtual RawAbstractTypeArguments* GetTypeArguments() const; |
| 3749 virtual void SetTypeArguments(const AbstractTypeArguments& value) const; | 3749 virtual void SetTypeArguments(const AbstractTypeArguments& value) const; |
| 3750 | 3750 |
| 3751 // Check if the type of this instance is a subtype of the given type. | 3751 // Check if the type of this instance is a subtype of the given type. |
| 3752 bool IsInstanceOf(const AbstractType& type, | 3752 bool IsInstanceOf(const AbstractType& type, |
| 3753 const AbstractTypeArguments& type_instantiator, | 3753 const AbstractTypeArguments& type_instantiator, |
| 3754 Error* bound_error) const; | 3754 Error* bound_error) const; |
| 3755 | 3755 |
| 3756 // Check whether this instance is identical to the argument according to the |
| 3757 // specification of dare:core's identical(). |
| 3758 bool IsIdenticalTo(const Instance& other) const; |
| 3759 |
| 3756 bool IsValidNativeIndex(int index) const { | 3760 bool IsValidNativeIndex(int index) const { |
| 3757 return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_)); | 3761 return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_)); |
| 3758 } | 3762 } |
| 3759 | 3763 |
| 3760 inline intptr_t GetNativeField(Isolate* isolate, int index) const; | 3764 inline intptr_t GetNativeField(Isolate* isolate, int index) const; |
| 3761 void SetNativeField(int index, intptr_t value) const; | 3765 void SetNativeField(int index, intptr_t value) const; |
| 3762 | 3766 |
| 3763 // Returns true if the instance is a closure object. | 3767 // Returns true if the instance is a closure object. |
| 3764 bool IsClosure() const; | 3768 bool IsClosure() const; |
| 3765 | 3769 |
| (...skipping 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6176 | 6180 |
| 6177 | 6181 |
| 6178 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6182 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6179 intptr_t index) { | 6183 intptr_t index) { |
| 6180 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6184 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6181 } | 6185 } |
| 6182 | 6186 |
| 6183 } // namespace dart | 6187 } // namespace dart |
| 6184 | 6188 |
| 6185 #endif // VM_OBJECT_H_ | 6189 #endif // VM_OBJECT_H_ |
| OLD | NEW |