| 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 3090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3101 RawType* GetType() const; | 3101 RawType* GetType() const; |
| 3102 | 3102 |
| 3103 virtual RawAbstractTypeArguments* GetTypeArguments() const; | 3103 virtual RawAbstractTypeArguments* GetTypeArguments() const; |
| 3104 virtual void SetTypeArguments(const AbstractTypeArguments& value) const; | 3104 virtual void SetTypeArguments(const AbstractTypeArguments& value) const; |
| 3105 | 3105 |
| 3106 // Check if the type of this instance is a subtype of the given type. | 3106 // Check if the type of this instance is a subtype of the given type. |
| 3107 bool IsInstanceOf(const AbstractType& type, | 3107 bool IsInstanceOf(const AbstractType& type, |
| 3108 const AbstractTypeArguments& type_instantiator, | 3108 const AbstractTypeArguments& type_instantiator, |
| 3109 Error* malformed_error) const; | 3109 Error* malformed_error) const; |
| 3110 | 3110 |
| 3111 bool IsValidNativeIndex(int index) const; | 3111 bool IsValidNativeIndex(int index) const { |
| 3112 return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_)); |
| 3113 } |
| 3112 | 3114 |
| 3113 intptr_t GetNativeField(int index) const { | 3115 intptr_t GetNativeField(int index) const { |
| 3114 return *NativeFieldAddr(index); | 3116 return *NativeFieldAddr(index); |
| 3115 } | 3117 } |
| 3116 | 3118 |
| 3117 void SetNativeField(int index, intptr_t value) const { | 3119 void SetNativeField(int index, intptr_t value) const { |
| 3118 *NativeFieldAddr(index) = value; | 3120 *NativeFieldAddr(index) = value; |
| 3119 } | 3121 } |
| 3120 | 3122 |
| 3121 static intptr_t InstanceSize() { | 3123 static intptr_t InstanceSize() { |
| (...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5553 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5555 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5554 return false; | 5556 return false; |
| 5555 } | 5557 } |
| 5556 } | 5558 } |
| 5557 return true; | 5559 return true; |
| 5558 } | 5560 } |
| 5559 | 5561 |
| 5560 } // namespace dart | 5562 } // namespace dart |
| 5561 | 5563 |
| 5562 #endif // VM_OBJECT_H_ | 5564 #endif // VM_OBJECT_H_ |
| OLD | NEW |