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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1692 bool is_intrinsic() const { | 1692 bool is_intrinsic() const { |
1693 return IntrinsicBit::decode(raw_ptr()->kind_tag_); | 1693 return IntrinsicBit::decode(raw_ptr()->kind_tag_); |
1694 } | 1694 } |
1695 void set_is_intrinsic(bool value) const; | 1695 void set_is_intrinsic(bool value) const; |
1696 | 1696 |
1697 bool is_recognized() const { | 1697 bool is_recognized() const { |
1698 return RecognizedBit::decode(raw_ptr()->kind_tag_); | 1698 return RecognizedBit::decode(raw_ptr()->kind_tag_); |
1699 } | 1699 } |
1700 void set_is_recognized(bool value) const; | 1700 void set_is_recognized(bool value) const; |
1701 | 1701 |
1702 bool is_redirecting() const { | |
1703 return RedirectingBit::decode(raw_ptr()->kind_tag_); | |
1704 } | |
1705 void set_is_redirecting(bool value) const; | |
1706 | |
1702 bool HasOptimizedCode() const; | 1707 bool HasOptimizedCode() const; |
1703 | 1708 |
1704 // Returns true if the argument counts are valid for calling this function. | 1709 // Returns true if the argument counts are valid for calling this function. |
1705 // Otherwise, it returns false and the reason (if error_message is not NULL). | 1710 // Otherwise, it returns false and the reason (if error_message is not NULL). |
1706 bool AreValidArgumentCounts(intptr_t num_arguments, | 1711 bool AreValidArgumentCounts(intptr_t num_arguments, |
1707 intptr_t num_named_arguments, | 1712 intptr_t num_named_arguments, |
1708 String* error_message) const; | 1713 String* error_message) const; |
1709 | 1714 |
1710 // Returns true if the total argument count and the names of optional | 1715 // Returns true if the total argument count and the names of optional |
1711 // arguments are valid for calling this function. | 1716 // arguments are valid for calling this function. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1851 kConstBit = 1, | 1856 kConstBit = 1, |
1852 kOptimizableBit = 2, | 1857 kOptimizableBit = 2, |
1853 kInlinableBit = 3, | 1858 kInlinableBit = 3, |
1854 kHasFinallyBit = 4, | 1859 kHasFinallyBit = 4, |
1855 kNativeBit = 5, | 1860 kNativeBit = 5, |
1856 kAbstractBit = 6, | 1861 kAbstractBit = 6, |
1857 kExternalBit = 7, | 1862 kExternalBit = 7, |
1858 kVisibleBit = 8, | 1863 kVisibleBit = 8, |
1859 kIntrinsicBit = 9, | 1864 kIntrinsicBit = 9, |
1860 kRecognizedBit = 10, | 1865 kRecognizedBit = 10, |
1861 kKindTagBit = 11, | 1866 kRedirectingBit = 11, |
rmacnak
2013/10/09 01:24:43
And now all 16 bits are used :/
hausner
2013/10/09 05:23:03
Dang, I should have grabbed this bit a long time a
| |
1867 kKindTagBit = 12, | |
1862 kKindTagSize = 4, | 1868 kKindTagSize = 4, |
1863 }; | 1869 }; |
1864 class StaticBit : public BitField<bool, kStaticBit, 1> {}; | 1870 class StaticBit : public BitField<bool, kStaticBit, 1> {}; |
1865 class ConstBit : public BitField<bool, kConstBit, 1> {}; | 1871 class ConstBit : public BitField<bool, kConstBit, 1> {}; |
1866 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; | 1872 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; |
1867 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; | 1873 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; |
1868 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; | 1874 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; |
1869 class NativeBit : public BitField<bool, kNativeBit, 1> {}; | 1875 class NativeBit : public BitField<bool, kNativeBit, 1> {}; |
1870 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; | 1876 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; |
1871 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; | 1877 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; |
1872 class VisibleBit : public BitField<bool, kVisibleBit, 1> {}; | 1878 class VisibleBit : public BitField<bool, kVisibleBit, 1> {}; |
1873 class IntrinsicBit : public BitField<bool, kIntrinsicBit, 1> {}; | 1879 class IntrinsicBit : public BitField<bool, kIntrinsicBit, 1> {}; |
1874 class RecognizedBit : public BitField<bool, kRecognizedBit, 1> {}; | 1880 class RecognizedBit : public BitField<bool, kRecognizedBit, 1> {}; |
1881 class RedirectingBit : public BitField<bool, kRedirectingBit, 1> {}; | |
1875 class KindBits : | 1882 class KindBits : |
1876 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT | 1883 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT |
1877 | 1884 |
1878 void set_name(const String& value) const; | 1885 void set_name(const String& value) const; |
1879 void set_kind(RawFunction::Kind value) const; | 1886 void set_kind(RawFunction::Kind value) const; |
1880 void set_is_static(bool value) const; | 1887 void set_is_static(bool value) const; |
1881 void set_is_const(bool value) const; | 1888 void set_is_const(bool value) const; |
1882 void set_is_external(bool value) const; | 1889 void set_is_external(bool value) const; |
1883 void set_parent_function(const Function& value) const; | 1890 void set_parent_function(const Function& value) const; |
1884 void set_owner(const Object& value) const; | 1891 void set_owner(const Object& value) const; |
(...skipping 4358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6243 | 6250 |
6244 | 6251 |
6245 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6252 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6246 intptr_t index) { | 6253 intptr_t index) { |
6247 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6254 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6248 } | 6255 } |
6249 | 6256 |
6250 } // namespace dart | 6257 } // namespace dart |
6251 | 6258 |
6252 #endif // VM_OBJECT_H_ | 6259 #endif // VM_OBJECT_H_ |
OLD | NEW |