| 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 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3554 ASSERT(!IsNull()); | 3554 ASSERT(!IsNull()); |
| 3555 ASSERT(index < Length()); | 3555 ASSERT(index < Length()); |
| 3556 StorePointer(ObjectAddr(index), value.raw()); | 3556 StorePointer(ObjectAddr(index), value.raw()); |
| 3557 } | 3557 } |
| 3558 | 3558 |
| 3559 void Add(const Object& value, Heap::Space space = Heap::kNew) const; | 3559 void Add(const Object& value, Heap::Space space = Heap::kNew) const; |
| 3560 void Grow(intptr_t new_capacity, Heap::Space space = Heap::kNew) const; | 3560 void Grow(intptr_t new_capacity, Heap::Space space = Heap::kNew) const; |
| 3561 RawObject* RemoveLast() const; | 3561 RawObject* RemoveLast() const; |
| 3562 | 3562 |
| 3563 virtual RawAbstractTypeArguments* GetTypeArguments() const { | 3563 virtual RawAbstractTypeArguments* GetTypeArguments() const { |
| 3564 const Array& contents = Array::Handle(data()); | 3564 // TODO(regis): Enable asserts once allocation of array literal fixed. |
| 3565 return contents.GetTypeArguments(); | 3565 // ASSERT(Array::Handle(data()).GetTypeArguments() == |
| 3566 // raw_ptr()->type_arguments_); |
| 3567 return raw_ptr()->type_arguments_; |
| 3566 } | 3568 } |
| 3567 virtual void SetTypeArguments(const AbstractTypeArguments& value) const { | 3569 virtual void SetTypeArguments(const AbstractTypeArguments& value) const { |
| 3568 const Array& contents = Array::Handle(data()); | 3570 const Array& contents = Array::Handle(data()); |
| 3569 contents.SetTypeArguments(value); | 3571 contents.SetTypeArguments(value); |
| 3570 raw_ptr()->type_arguments_ = value.raw(); | 3572 raw_ptr()->type_arguments_ = value.raw(); |
| 3571 } | 3573 } |
| 3572 | 3574 |
| 3573 virtual bool Equals(const Instance& other) const; | 3575 virtual bool Equals(const Instance& other) const; |
| 3574 | 3576 |
| 3575 static intptr_t type_arguments_offset() { | 3577 static intptr_t type_arguments_offset() { |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4019 } | 4021 } |
| 4020 | 4022 |
| 4021 | 4023 |
| 4022 intptr_t Stackmap::SizeInBits() const { | 4024 intptr_t Stackmap::SizeInBits() const { |
| 4023 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4025 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 4024 } | 4026 } |
| 4025 | 4027 |
| 4026 } // namespace dart | 4028 } // namespace dart |
| 4027 | 4029 |
| 4028 #endif // VM_OBJECT_H_ | 4030 #endif // VM_OBJECT_H_ |
| OLD | NEW |