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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1628 bool is_visible() const { | 1628 bool is_visible() const { |
1629 return VisibleBit::decode(raw_ptr()->kind_tag_); | 1629 return VisibleBit::decode(raw_ptr()->kind_tag_); |
1630 } | 1630 } |
1631 void set_is_visible(bool value) const; | 1631 void set_is_visible(bool value) const; |
1632 | 1632 |
1633 bool is_intrinsic() const { | 1633 bool is_intrinsic() const { |
1634 return IntrinsicBit::decode(raw_ptr()->kind_tag_); | 1634 return IntrinsicBit::decode(raw_ptr()->kind_tag_); |
1635 } | 1635 } |
1636 void set_is_intrinsic(bool value) const; | 1636 void set_is_intrinsic(bool value) const; |
1637 | 1637 |
| 1638 bool needs_far_branches() const { |
| 1639 return FarBranchesBit::decode(raw_ptr()->kind_tag_); |
| 1640 } |
| 1641 void set_needs_far_branches(bool value) const; |
| 1642 |
1638 bool HasOptimizedCode() const; | 1643 bool HasOptimizedCode() const; |
1639 | 1644 |
1640 // Returns true if the argument counts are valid for calling this function. | 1645 // Returns true if the argument counts are valid for calling this function. |
1641 // Otherwise, it returns false and the reason (if error_message is not NULL). | 1646 // Otherwise, it returns false and the reason (if error_message is not NULL). |
1642 bool AreValidArgumentCounts(intptr_t num_arguments, | 1647 bool AreValidArgumentCounts(intptr_t num_arguments, |
1643 intptr_t num_named_arguments, | 1648 intptr_t num_named_arguments, |
1644 String* error_message) const; | 1649 String* error_message) const; |
1645 | 1650 |
1646 // Returns true if the total argument count and the names of optional | 1651 // Returns true if the total argument count and the names of optional |
1647 // arguments are valid for calling this function. | 1652 // arguments are valid for calling this function. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 kStaticBit = 0, | 1785 kStaticBit = 0, |
1781 kConstBit = 1, | 1786 kConstBit = 1, |
1782 kOptimizableBit = 2, | 1787 kOptimizableBit = 2, |
1783 kInlinableBit = 3, | 1788 kInlinableBit = 3, |
1784 kHasFinallyBit = 4, | 1789 kHasFinallyBit = 4, |
1785 kNativeBit = 5, | 1790 kNativeBit = 5, |
1786 kAbstractBit = 6, | 1791 kAbstractBit = 6, |
1787 kExternalBit = 7, | 1792 kExternalBit = 7, |
1788 kVisibleBit = 8, | 1793 kVisibleBit = 8, |
1789 kIntrinsicBit = 9, | 1794 kIntrinsicBit = 9, |
1790 kKindTagBit = 10, | 1795 kNeedsFarBranchesBit = 10, |
| 1796 kKindTagBit = 11, |
1791 kKindTagSize = 4, | 1797 kKindTagSize = 4, |
1792 }; | 1798 }; |
1793 class StaticBit : public BitField<bool, kStaticBit, 1> {}; | 1799 class StaticBit : public BitField<bool, kStaticBit, 1> {}; |
1794 class ConstBit : public BitField<bool, kConstBit, 1> {}; | 1800 class ConstBit : public BitField<bool, kConstBit, 1> {}; |
1795 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; | 1801 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; |
1796 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; | 1802 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; |
1797 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; | 1803 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; |
1798 class NativeBit : public BitField<bool, kNativeBit, 1> {}; | 1804 class NativeBit : public BitField<bool, kNativeBit, 1> {}; |
1799 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; | 1805 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; |
1800 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; | 1806 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; |
1801 class VisibleBit : public BitField<bool, kVisibleBit, 1> {}; | 1807 class VisibleBit : public BitField<bool, kVisibleBit, 1> {}; |
1802 class IntrinsicBit : public BitField<bool, kIntrinsicBit, 1> {}; | 1808 class IntrinsicBit : public BitField<bool, kIntrinsicBit, 1> {}; |
| 1809 class FarBranchesBit : public BitField<bool, kNeedsFarBranchesBit, 1> {}; |
1803 class KindBits : | 1810 class KindBits : |
1804 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT | 1811 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT |
1805 | 1812 |
1806 void set_name(const String& value) const; | 1813 void set_name(const String& value) const; |
1807 void set_kind(RawFunction::Kind value) const; | 1814 void set_kind(RawFunction::Kind value) const; |
1808 void set_is_static(bool value) const; | 1815 void set_is_static(bool value) const; |
1809 void set_is_const(bool value) const; | 1816 void set_is_const(bool value) const; |
1810 void set_is_external(bool value) const; | 1817 void set_is_external(bool value) const; |
1811 void set_parent_function(const Function& value) const; | 1818 void set_parent_function(const Function& value) const; |
1812 void set_owner(const Object& value) const; | 1819 void set_owner(const Object& value) const; |
(...skipping 4218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6031 | 6038 |
6032 | 6039 |
6033 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6040 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6034 intptr_t index) { | 6041 intptr_t index) { |
6035 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6042 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6036 } | 6043 } |
6037 | 6044 |
6038 } // namespace dart | 6045 } // namespace dart |
6039 | 6046 |
6040 #endif // VM_OBJECT_H_ | 6047 #endif // VM_OBJECT_H_ |
OLD | NEW |