Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: runtime/vm/object.h

Issue 23190003: ClassMirror.mixin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 enum { 1010 enum {
1006 kConstBit = 0, 1011 kConstBit = 0,
1007 kImplementedBit = 1, 1012 kImplementedBit = 1,
1008 kAbstractBit = 2, 1013 kAbstractBit = 2,
1009 kPatchBit = 3, 1014 kPatchBit = 3,
1010 kSynthesizedClassBit = 4, 1015 kSynthesizedClassBit = 4,
1011 kTypeFinalizedBit = 5, 1016 kTypeFinalizedBit = 5,
1012 kStateTagBit = 6, 1017 kStateTagBit = 6,
1013 kStateTagSize = 2, 1018 kStateTagSize = 2,
1014 kMarkedForParsingBit = 8, 1019 kMarkedForParsingBit = 8,
1020 kMixinTypedefBit = 9,
1015 }; 1021 };
1016 class ConstBit : public BitField<bool, kConstBit, 1> {}; 1022 class ConstBit : public BitField<bool, kConstBit, 1> {};
1017 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {}; 1023 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
1018 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; 1024 class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
1019 class PatchBit : public BitField<bool, kPatchBit, 1> {}; 1025 class PatchBit : public BitField<bool, kPatchBit, 1> {};
1020 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {}; 1026 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {};
1021 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {}; 1027 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {};
1022 class StateBits : public BitField<RawClass::ClassState, 1028 class StateBits : public BitField<RawClass::ClassState,
1023 kStateTagBit, kStateTagSize> {}; // NOLINT 1029 kStateTagBit, kStateTagSize> {}; // NOLINT
1024 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {}; 1030 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {};
1031 class MixinTypedefBit : public BitField<bool, kMixinTypedefBit, 1> {};
1025 1032
1026 void set_name(const String& value) const; 1033 void set_name(const String& value) const;
1027 void set_signature_function(const Function& value) const; 1034 void set_signature_function(const Function& value) const;
1028 void set_signature_type(const AbstractType& value) const; 1035 void set_signature_type(const AbstractType& value) const;
1029 void set_class_state(RawClass::ClassState state) const; 1036 void set_class_state(RawClass::ClassState state) const;
1030 void set_state_bits(intptr_t bits) const; 1037 void set_state_bits(intptr_t bits) const;
1031 1038
1032 void set_constants(const Array& value) const; 1039 void set_constants(const Array& value) const;
1033 1040
1034 void set_canonical_types(const Array& value) const; 1041 void set_canonical_types(const Array& value) const;
(...skipping 5081 matching lines...) Expand 10 before | Expand all | Expand 10 after
6116 6123
6117 6124
6118 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6125 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6119 intptr_t index) { 6126 intptr_t index) {
6120 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6127 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6121 } 6128 }
6122 6129
6123 } // namespace dart 6130 } // namespace dart
6124 6131
6125 #endif // VM_OBJECT_H_ 6132 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698