| 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 NameVisibility name_visibility) const { | 1352 NameVisibility name_visibility) const { |
| 1353 const bool instantiate = true; | 1353 const bool instantiate = true; |
| 1354 return BuildSignature(instantiate, name_visibility, instantiator); | 1354 return BuildSignature(instantiate, name_visibility, instantiator); |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 // Returns true if the signature of this function is instantiated, i.e. if it | 1357 // Returns true if the signature of this function is instantiated, i.e. if it |
| 1358 // does not involve generic parameter types or generic result type. | 1358 // does not involve generic parameter types or generic result type. |
| 1359 bool HasInstantiatedSignature() const; | 1359 bool HasInstantiatedSignature() const; |
| 1360 | 1360 |
| 1361 RawClass* owner() const { return raw_ptr()->owner_; } | 1361 RawClass* owner() const { return raw_ptr()->owner_; } |
| 1362 void set_owner(const Class& value) const; | |
| 1363 | 1362 |
| 1364 RawAbstractType* result_type() const { return raw_ptr()->result_type_; } | 1363 RawAbstractType* result_type() const { return raw_ptr()->result_type_; } |
| 1365 void set_result_type(const AbstractType& value) const; | 1364 void set_result_type(const AbstractType& value) const; |
| 1366 | 1365 |
| 1367 RawAbstractType* ParameterTypeAt(intptr_t index) const; | 1366 RawAbstractType* ParameterTypeAt(intptr_t index) const; |
| 1368 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const; | 1367 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const; |
| 1369 void set_parameter_types(const Array& value) const; | 1368 void set_parameter_types(const Array& value) const; |
| 1370 | 1369 |
| 1371 // Parameter names are valid for all valid parameter indices, and are not | 1370 // Parameter names are valid for all valid parameter indices, and are not |
| 1372 // limited to named optional parameters. | 1371 // limited to named optional parameters. |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 static const int kCtorPhaseBody = 1 << 1; | 1624 static const int kCtorPhaseBody = 1 << 1; |
| 1626 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); | 1625 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); |
| 1627 | 1626 |
| 1628 private: | 1627 private: |
| 1629 void set_name(const String& value) const; | 1628 void set_name(const String& value) const; |
| 1630 void set_kind(RawFunction::Kind value) const; | 1629 void set_kind(RawFunction::Kind value) const; |
| 1631 void set_is_static(bool is_static) const; | 1630 void set_is_static(bool is_static) const; |
| 1632 void set_is_const(bool is_const) const; | 1631 void set_is_const(bool is_const) const; |
| 1633 void set_is_external(bool value) const; | 1632 void set_is_external(bool value) const; |
| 1634 void set_parent_function(const Function& value) const; | 1633 void set_parent_function(const Function& value) const; |
| 1634 void set_owner(const Class& value) const; |
| 1635 void set_token_pos(intptr_t value) const; | 1635 void set_token_pos(intptr_t value) const; |
| 1636 void set_implicit_closure_function(const Function& value) const; | 1636 void set_implicit_closure_function(const Function& value) const; |
| 1637 static RawFunction* New(); | 1637 static RawFunction* New(); |
| 1638 | 1638 |
| 1639 RawString* BuildSignature(bool instantiate, | 1639 RawString* BuildSignature(bool instantiate, |
| 1640 NameVisibility name_visibility, | 1640 NameVisibility name_visibility, |
| 1641 const AbstractTypeArguments& instantiator) const; | 1641 const AbstractTypeArguments& instantiator) const; |
| 1642 | 1642 |
| 1643 // Check the subtype or 'more specific' relationship. | 1643 // Check the subtype or 'more specific' relationship. |
| 1644 bool TypeTest(TypeTestKind test_kind, | 1644 bool TypeTest(TypeTestKind test_kind, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1669 bool is_final() const { return raw_ptr()->is_final_; } | 1669 bool is_final() const { return raw_ptr()->is_final_; } |
| 1670 bool is_const() const { return raw_ptr()->is_const_; } | 1670 bool is_const() const { return raw_ptr()->is_const_; } |
| 1671 | 1671 |
| 1672 inline intptr_t Offset() const; | 1672 inline intptr_t Offset() const; |
| 1673 inline void SetOffset(intptr_t value) const; | 1673 inline void SetOffset(intptr_t value) const; |
| 1674 | 1674 |
| 1675 RawInstance* value() const; | 1675 RawInstance* value() const; |
| 1676 void set_value(const Instance& value) const; | 1676 void set_value(const Instance& value) const; |
| 1677 | 1677 |
| 1678 RawClass* owner() const { return raw_ptr()->owner_; } | 1678 RawClass* owner() const { return raw_ptr()->owner_; } |
| 1679 void set_owner(const Class& value) const { | |
| 1680 StorePointer(&raw_ptr()->owner_, value.raw()); | |
| 1681 } | |
| 1682 | 1679 |
| 1683 RawAbstractType* type() const { return raw_ptr()->type_; } | 1680 RawAbstractType* type() const { return raw_ptr()->type_; } |
| 1684 void set_type(const AbstractType& value) const; | 1681 void set_type(const AbstractType& value) const; |
| 1685 | 1682 |
| 1686 static intptr_t InstanceSize() { | 1683 static intptr_t InstanceSize() { |
| 1687 return RoundedAllocationSize(sizeof(RawField)); | 1684 return RoundedAllocationSize(sizeof(RawField)); |
| 1688 } | 1685 } |
| 1689 | 1686 |
| 1690 static RawField* New(const String& name, | 1687 static RawField* New(const String& name, |
| 1691 bool is_static, | 1688 bool is_static, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1717 void set_name(const String& value) const; | 1714 void set_name(const String& value) const; |
| 1718 void set_is_static(bool is_static) const { | 1715 void set_is_static(bool is_static) const { |
| 1719 raw_ptr()->is_static_ = is_static; | 1716 raw_ptr()->is_static_ = is_static; |
| 1720 } | 1717 } |
| 1721 void set_is_final(bool is_final) const { | 1718 void set_is_final(bool is_final) const { |
| 1722 raw_ptr()->is_final_ = is_final; | 1719 raw_ptr()->is_final_ = is_final; |
| 1723 } | 1720 } |
| 1724 void set_is_const(bool value) const { | 1721 void set_is_const(bool value) const { |
| 1725 raw_ptr()->is_const_ = value; | 1722 raw_ptr()->is_const_ = value; |
| 1726 } | 1723 } |
| 1724 void set_owner(const Class& value) const { |
| 1725 StorePointer(&raw_ptr()->owner_, value.raw()); |
| 1726 } |
| 1727 void set_token_pos(intptr_t token_pos) const { | 1727 void set_token_pos(intptr_t token_pos) const { |
| 1728 raw_ptr()->token_pos_ = token_pos; | 1728 raw_ptr()->token_pos_ = token_pos; |
| 1729 } | 1729 } |
| 1730 static RawField* New(); | 1730 static RawField* New(); |
| 1731 | 1731 |
| 1732 HEAP_OBJECT_IMPLEMENTATION(Field, Object); | 1732 HEAP_OBJECT_IMPLEMENTATION(Field, Object); |
| 1733 friend class Class; | 1733 friend class Class; |
| 1734 }; | 1734 }; |
| 1735 | 1735 |
| 1736 | 1736 |
| (...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5448 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5448 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5449 return false; | 5449 return false; |
| 5450 } | 5450 } |
| 5451 } | 5451 } |
| 5452 return true; | 5452 return true; |
| 5453 } | 5453 } |
| 5454 | 5454 |
| 5455 } // namespace dart | 5455 } // namespace dart |
| 5456 | 5456 |
| 5457 #endif // VM_OBJECT_H_ | 5457 #endif // VM_OBJECT_H_ |
| OLD | NEW |