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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 5426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5437 virtual bool CheckIsCanonical(Thread* thread) const; | 5437 virtual bool CheckIsCanonical(Thread* thread) const; |
5438 #endif // DEBUG | 5438 #endif // DEBUG |
5439 | 5439 |
5440 RawObject* GetField(const Field& field) const { return *FieldAddr(field); } | 5440 RawObject* GetField(const Field& field) const { return *FieldAddr(field); } |
5441 | 5441 |
5442 void SetField(const Field& field, const Object& value) const { | 5442 void SetField(const Field& field, const Object& value) const { |
5443 field.RecordStore(value); | 5443 field.RecordStore(value); |
5444 StorePointer(FieldAddr(field), value.raw()); | 5444 StorePointer(FieldAddr(field), value.raw()); |
5445 } | 5445 } |
5446 | 5446 |
5447 RawAbstractType* GetType() const; | 5447 RawAbstractType* GetType(Heap::Space space) const; |
5448 | 5448 |
5449 virtual RawTypeArguments* GetTypeArguments() const; | 5449 virtual RawTypeArguments* GetTypeArguments() const; |
5450 virtual void SetTypeArguments(const TypeArguments& value) const; | 5450 virtual void SetTypeArguments(const TypeArguments& value) const; |
5451 | 5451 |
5452 // Check if the type of this instance is a subtype of the given type. | 5452 // Check if the type of this instance is a subtype of the given type. |
5453 bool IsInstanceOf(const AbstractType& type, | 5453 bool IsInstanceOf(const AbstractType& type, |
5454 const TypeArguments& type_instantiator, | 5454 const TypeArguments& type_instantiator, |
5455 Error* bound_error) const; | 5455 Error* bound_error) const; |
5456 | 5456 |
5457 bool IsValidNativeIndex(int index) const { | 5457 bool IsValidNativeIndex(int index) const { |
(...skipping 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8832 | 8832 |
8833 inline void TypeArguments::SetHash(intptr_t value) const { | 8833 inline void TypeArguments::SetHash(intptr_t value) const { |
8834 // This is only safe because we create a new Smi, which does not cause | 8834 // This is only safe because we create a new Smi, which does not cause |
8835 // heap allocation. | 8835 // heap allocation. |
8836 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8836 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8837 } | 8837 } |
8838 | 8838 |
8839 } // namespace dart | 8839 } // namespace dart |
8840 | 8840 |
8841 #endif // RUNTIME_VM_OBJECT_H_ | 8841 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |