| 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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 return HasFinallyBit::decode(raw_ptr()->kind_tag_); | 1550 return HasFinallyBit::decode(raw_ptr()->kind_tag_); |
| 1551 } | 1551 } |
| 1552 void set_has_finally(bool value) const; | 1552 void set_has_finally(bool value) const; |
| 1553 | 1553 |
| 1554 bool is_native() const { return NativeBit::decode(raw_ptr()->kind_tag_); } | 1554 bool is_native() const { return NativeBit::decode(raw_ptr()->kind_tag_); } |
| 1555 void set_is_native(bool value) const; | 1555 void set_is_native(bool value) const; |
| 1556 | 1556 |
| 1557 bool is_abstract() const { return AbstractBit::decode(raw_ptr()->kind_tag_); } | 1557 bool is_abstract() const { return AbstractBit::decode(raw_ptr()->kind_tag_); } |
| 1558 void set_is_abstract(bool value) const; | 1558 void set_is_abstract(bool value) const; |
| 1559 | 1559 |
| 1560 bool is_inlinable() const { |
| 1561 return InlinableBit::decode(raw_ptr()->kind_tag_); |
| 1562 } |
| 1563 void set_is_inlinable(bool value) const; |
| 1564 |
| 1560 bool HasOptimizedCode() const; | 1565 bool HasOptimizedCode() const; |
| 1561 | 1566 |
| 1562 // Returns true if the argument counts are valid for calling this function. | 1567 // Returns true if the argument counts are valid for calling this function. |
| 1563 // Otherwise, it returns false and the reason (if error_message is not NULL). | 1568 // Otherwise, it returns false and the reason (if error_message is not NULL). |
| 1564 bool AreValidArgumentCounts(int num_arguments, | 1569 bool AreValidArgumentCounts(int num_arguments, |
| 1565 int num_named_arguments, | 1570 int num_named_arguments, |
| 1566 String* error_message) const; | 1571 String* error_message) const; |
| 1567 | 1572 |
| 1568 // Returns true if the total argument count and the names of optional | 1573 // Returns true if the total argument count and the names of optional |
| 1569 // arguments are valid for calling this function. | 1574 // arguments are valid for calling this function. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 | 1682 |
| 1678 static const int kCtorPhaseInit = 1 << 0; | 1683 static const int kCtorPhaseInit = 1 << 0; |
| 1679 static const int kCtorPhaseBody = 1 << 1; | 1684 static const int kCtorPhaseBody = 1 << 1; |
| 1680 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); | 1685 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); |
| 1681 | 1686 |
| 1682 private: | 1687 private: |
| 1683 enum KindTagBits { | 1688 enum KindTagBits { |
| 1684 kStaticBit = 1, | 1689 kStaticBit = 1, |
| 1685 kConstBit, | 1690 kConstBit, |
| 1686 kOptimizableBit, | 1691 kOptimizableBit, |
| 1692 kInlinableBit, |
| 1687 kHasFinallyBit, | 1693 kHasFinallyBit, |
| 1688 kNativeBit, | 1694 kNativeBit, |
| 1689 kAbstractBit, | 1695 kAbstractBit, |
| 1690 kExternalBit, | 1696 kExternalBit, |
| 1691 kKindTagBit, | 1697 kKindTagBit, |
| 1692 kKindTagSize = 4, | 1698 kKindTagSize = 4, |
| 1693 }; | 1699 }; |
| 1694 class StaticBit : public BitField<bool, kStaticBit, 1> {}; | 1700 class StaticBit : public BitField<bool, kStaticBit, 1> {}; |
| 1695 class ConstBit : public BitField<bool, kConstBit, 1> {}; | 1701 class ConstBit : public BitField<bool, kConstBit, 1> {}; |
| 1696 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; | 1702 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; |
| 1703 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; |
| 1697 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; | 1704 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; |
| 1698 class NativeBit : public BitField<bool, kNativeBit, 1> {}; | 1705 class NativeBit : public BitField<bool, kNativeBit, 1> {}; |
| 1699 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; | 1706 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; |
| 1700 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; | 1707 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; |
| 1701 class KindBits : | 1708 class KindBits : |
| 1702 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT | 1709 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT |
| 1703 | 1710 |
| 1704 void set_name(const String& value) const; | 1711 void set_name(const String& value) const; |
| 1705 void set_kind(RawFunction::Kind value) const; | 1712 void set_kind(RawFunction::Kind value) const; |
| 1706 void set_is_static(bool value) const; | 1713 void set_is_static(bool value) const; |
| (...skipping 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5716 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5723 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5717 return false; | 5724 return false; |
| 5718 } | 5725 } |
| 5719 } | 5726 } |
| 5720 return true; | 5727 return true; |
| 5721 } | 5728 } |
| 5722 | 5729 |
| 5723 } // namespace dart | 5730 } // namespace dart |
| 5724 | 5731 |
| 5725 #endif // VM_OBJECT_H_ | 5732 #endif // VM_OBJECT_H_ |
| OLD | NEW |