| 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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 | 915 |
| 916 bool is_marked_for_parsing() const { | 916 bool is_marked_for_parsing() const { |
| 917 return MarkedForParsingBit::decode(raw_ptr()->state_bits_); | 917 return MarkedForParsingBit::decode(raw_ptr()->state_bits_); |
| 918 } | 918 } |
| 919 void set_is_marked_for_parsing() const; | 919 void set_is_marked_for_parsing() const; |
| 920 void reset_is_marked_for_parsing() const; | 920 void reset_is_marked_for_parsing() const; |
| 921 | 921 |
| 922 bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); } | 922 bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); } |
| 923 void set_is_const() const; | 923 void set_is_const() const; |
| 924 | 924 |
| 925 bool is_mixin_typedef() const { |
| 926 return MixinTypedefBit::decode(raw_ptr()->state_bits_); |
| 927 } |
| 928 void set_is_mixin_typedef() const; |
| 929 |
| 925 int num_native_fields() const { | 930 int num_native_fields() const { |
| 926 return raw_ptr()->num_native_fields_; | 931 return raw_ptr()->num_native_fields_; |
| 927 } | 932 } |
| 928 void set_num_native_fields(int value) const { | 933 void set_num_native_fields(int value) const { |
| 929 raw_ptr()->num_native_fields_ = value; | 934 raw_ptr()->num_native_fields_ = value; |
| 930 } | 935 } |
| 931 static intptr_t num_native_fields_offset() { | 936 static intptr_t num_native_fields_offset() { |
| 932 return OFFSET_OF(RawClass, num_native_fields_); | 937 return OFFSET_OF(RawClass, num_native_fields_); |
| 933 } | 938 } |
| 934 | 939 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 enum { | 1015 enum { |
| 1011 kConstBit = 0, | 1016 kConstBit = 0, |
| 1012 kImplementedBit = 1, | 1017 kImplementedBit = 1, |
| 1013 kAbstractBit = 2, | 1018 kAbstractBit = 2, |
| 1014 kPatchBit = 3, | 1019 kPatchBit = 3, |
| 1015 kSynthesizedClassBit = 4, | 1020 kSynthesizedClassBit = 4, |
| 1016 kTypeFinalizedBit = 5, | 1021 kTypeFinalizedBit = 5, |
| 1017 kStateTagBit = 6, | 1022 kStateTagBit = 6, |
| 1018 kStateTagSize = 2, | 1023 kStateTagSize = 2, |
| 1019 kMarkedForParsingBit = 8, | 1024 kMarkedForParsingBit = 8, |
| 1025 kMixinTypedefBit = 9, |
| 1020 }; | 1026 }; |
| 1021 class ConstBit : public BitField<bool, kConstBit, 1> {}; | 1027 class ConstBit : public BitField<bool, kConstBit, 1> {}; |
| 1022 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {}; | 1028 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {}; |
| 1023 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; | 1029 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; |
| 1024 class PatchBit : public BitField<bool, kPatchBit, 1> {}; | 1030 class PatchBit : public BitField<bool, kPatchBit, 1> {}; |
| 1025 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {}; | 1031 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {}; |
| 1026 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {}; | 1032 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {}; |
| 1027 class StateBits : public BitField<RawClass::ClassState, | 1033 class StateBits : public BitField<RawClass::ClassState, |
| 1028 kStateTagBit, kStateTagSize> {}; // NOLINT | 1034 kStateTagBit, kStateTagSize> {}; // NOLINT |
| 1029 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {}; | 1035 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {}; |
| 1036 class MixinTypedefBit : public BitField<bool, kMixinTypedefBit, 1> {}; |
| 1030 | 1037 |
| 1031 void set_name(const String& value) const; | 1038 void set_name(const String& value) const; |
| 1032 void set_signature_function(const Function& value) const; | 1039 void set_signature_function(const Function& value) const; |
| 1033 void set_signature_type(const AbstractType& value) const; | 1040 void set_signature_type(const AbstractType& value) const; |
| 1034 void set_class_state(RawClass::ClassState state) const; | 1041 void set_class_state(RawClass::ClassState state) const; |
| 1035 void set_state_bits(intptr_t bits) const; | 1042 void set_state_bits(intptr_t bits) const; |
| 1036 | 1043 |
| 1037 void set_constants(const Array& value) const; | 1044 void set_constants(const Array& value) const; |
| 1038 | 1045 |
| 1039 void set_canonical_types(const Array& value) const; | 1046 void set_canonical_types(const Array& value) const; |
| (...skipping 5094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6134 | 6141 |
| 6135 | 6142 |
| 6136 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6143 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6137 intptr_t index) { | 6144 intptr_t index) { |
| 6138 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6145 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6139 } | 6146 } |
| 6140 | 6147 |
| 6141 } // namespace dart | 6148 } // namespace dart |
| 6142 | 6149 |
| 6143 #endif // VM_OBJECT_H_ | 6150 #endif // VM_OBJECT_H_ |
| OLD | NEW |