| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 | 524 |
| 525 // If this class is parameterized, each instance has a type_arguments field. | 525 // If this class is parameterized, each instance has a type_arguments field. |
| 526 static const intptr_t kNoTypeArguments = -1; | 526 static const intptr_t kNoTypeArguments = -1; |
| 527 intptr_t type_arguments_instance_field_offset() const { | 527 intptr_t type_arguments_instance_field_offset() const { |
| 528 ASSERT(is_finalized() || is_prefinalized()); | 528 ASSERT(is_finalized() || is_prefinalized()); |
| 529 return raw_ptr()->type_arguments_instance_field_offset_; | 529 return raw_ptr()->type_arguments_instance_field_offset_; |
| 530 } | 530 } |
| 531 void set_type_arguments_instance_field_offset(intptr_t value) const { | 531 void set_type_arguments_instance_field_offset(intptr_t value) const { |
| 532 raw_ptr()->type_arguments_instance_field_offset_ = value; | 532 raw_ptr()->type_arguments_instance_field_offset_ = value; |
| 533 } | 533 } |
| 534 static intptr_t type_arguments_instance_field_offset_offset() { | |
| 535 return OFFSET_OF(RawClass, type_arguments_instance_field_offset_); | |
| 536 } | |
| 537 | 534 |
| 538 // The super type of this class, Object type if not explicitly specified. | 535 // The super type of this class, Object type if not explicitly specified. |
| 539 RawType* super_type() const { return raw_ptr()->super_type_; } | 536 RawType* super_type() const { return raw_ptr()->super_type_; } |
| 540 void set_super_type(const Type& value) const; | 537 void set_super_type(const Type& value) const; |
| 541 static intptr_t super_type_offset() { | 538 static intptr_t super_type_offset() { |
| 542 return OFFSET_OF(RawClass, super_type_); | 539 return OFFSET_OF(RawClass, super_type_); |
| 543 } | 540 } |
| 544 | 541 |
| 545 // Asserts that the class of the super type has been resolved. | 542 // Asserts that the class of the super type has been resolved. |
| 546 RawClass* SuperClass() const; | 543 RawClass* SuperClass() const; |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 public: | 1035 public: |
| 1039 virtual bool IsFinalized() const { return true; } | 1036 virtual bool IsFinalized() const { return true; } |
| 1040 virtual bool IsBeingFinalized() const { return false; } | 1037 virtual bool IsBeingFinalized() const { return false; } |
| 1041 virtual bool IsMalformed() const { return false; } | 1038 virtual bool IsMalformed() const { return false; } |
| 1042 virtual bool IsResolved() const { return true; } | 1039 virtual bool IsResolved() const { return true; } |
| 1043 virtual bool HasResolvedTypeClass() const { return true; } | 1040 virtual bool HasResolvedTypeClass() const { return true; } |
| 1044 virtual RawClass* type_class() const; | 1041 virtual RawClass* type_class() const; |
| 1045 virtual RawAbstractTypeArguments* arguments() const; | 1042 virtual RawAbstractTypeArguments* arguments() const; |
| 1046 virtual intptr_t token_index() const; | 1043 virtual intptr_t token_index() const; |
| 1047 virtual bool IsInstantiated() const { return true; } | 1044 virtual bool IsInstantiated() const { return true; } |
| 1048 virtual bool Equals(const AbstractType& other) const; | |
| 1049 | 1045 |
| 1050 RawAbstractType* uninstantiated_type() const { | 1046 RawAbstractType* uninstantiated_type() const { |
| 1051 return raw_ptr()->uninstantiated_type_; | 1047 return raw_ptr()->uninstantiated_type_; |
| 1052 } | 1048 } |
| 1053 RawAbstractTypeArguments* instantiator_type_arguments() const { | 1049 RawAbstractTypeArguments* instantiator_type_arguments() const { |
| 1054 return raw_ptr()->instantiator_type_arguments_; | 1050 return raw_ptr()->instantiator_type_arguments_; |
| 1055 } | 1051 } |
| 1056 | 1052 |
| 1057 static intptr_t InstanceSize() { | 1053 static intptr_t InstanceSize() { |
| 1058 return RoundedAllocationSize(sizeof(RawInstantiatedType)); | 1054 return RoundedAllocationSize(sizeof(RawInstantiatedType)); |
| (...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4004 } | 4000 } |
| 4005 | 4001 |
| 4006 | 4002 |
| 4007 intptr_t Stackmap::SizeInBits() const { | 4003 intptr_t Stackmap::SizeInBits() const { |
| 4008 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4004 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 4009 } | 4005 } |
| 4010 | 4006 |
| 4011 } // namespace dart | 4007 } // namespace dart |
| 4012 | 4008 |
| 4013 #endif // VM_OBJECT_H_ | 4009 #endif // VM_OBJECT_H_ |
| OLD | NEW |