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

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

Issue 23453024: Keep track of type parameter processing in mixin application classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 return PatchBit::decode(raw_ptr()->state_bits_); 896 return PatchBit::decode(raw_ptr()->state_bits_);
897 } 897 }
898 void set_is_patch() const; 898 void set_is_patch() const;
899 899
900 bool is_synthesized_class() const { 900 bool is_synthesized_class() const {
901 return SynthesizedClassBit::decode(raw_ptr()->state_bits_); 901 return SynthesizedClassBit::decode(raw_ptr()->state_bits_);
902 } 902 }
903 void set_is_synthesized_class() const; 903 void set_is_synthesized_class() const;
904 904
905 bool is_finalized() const { 905 bool is_finalized() const {
906 return StateBits::decode(raw_ptr()->state_bits_) == RawClass::kFinalized; 906 return ClassFinalizedBits::decode(raw_ptr()->state_bits_)
907 == RawClass::kFinalized;
907 } 908 }
908 void set_is_finalized() const; 909 void set_is_finalized() const;
909 910
910 bool is_prefinalized() const { 911 bool is_prefinalized() const {
911 return StateBits::decode(raw_ptr()->state_bits_) == RawClass::kPreFinalized; 912 return ClassFinalizedBits::decode(raw_ptr()->state_bits_)
913 == RawClass::kPreFinalized;
912 } 914 }
913 915
914 void set_is_prefinalized() const; 916 void set_is_prefinalized() const;
915 917
916 bool is_marked_for_parsing() const { 918 bool is_marked_for_parsing() const {
917 return MarkedForParsingBit::decode(raw_ptr()->state_bits_); 919 return MarkedForParsingBit::decode(raw_ptr()->state_bits_);
918 } 920 }
919 void set_is_marked_for_parsing() const; 921 void set_is_marked_for_parsing() const;
920 void reset_is_marked_for_parsing() const; 922 void reset_is_marked_for_parsing() const;
921 923
922 bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); } 924 bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); }
923 void set_is_const() const; 925 void set_is_const() const;
924 926
925 bool is_mixin_typedef() const { 927 bool is_mixin_typedef() const {
926 return MixinTypedefBit::decode(raw_ptr()->state_bits_); 928 return MixinTypedefBit::decode(raw_ptr()->state_bits_);
927 } 929 }
928 void set_is_mixin_typedef() const; 930 void set_is_mixin_typedef() const;
929 931
932 bool is_mixin_type_applied() const {
933 return MixinTypeAppliedBit::decode(raw_ptr()->state_bits_);
934 }
935 void set_is_mixin_type_applied() const;
936
930 int num_native_fields() const { 937 int num_native_fields() const {
931 return raw_ptr()->num_native_fields_; 938 return raw_ptr()->num_native_fields_;
932 } 939 }
933 void set_num_native_fields(int value) const { 940 void set_num_native_fields(int value) const {
934 raw_ptr()->num_native_fields_ = value; 941 raw_ptr()->num_native_fields_ = value;
935 } 942 }
936 static intptr_t num_native_fields_offset() { 943 static intptr_t num_native_fields_offset() {
937 return OFFSET_OF(RawClass, num_native_fields_); 944 return OFFSET_OF(RawClass, num_native_fields_);
938 } 945 }
939 946
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 kConstructor, 1019 kConstructor,
1013 kFactory, 1020 kFactory,
1014 }; 1021 };
1015 enum { 1022 enum {
1016 kConstBit = 0, 1023 kConstBit = 0,
1017 kImplementedBit = 1, 1024 kImplementedBit = 1,
1018 kAbstractBit = 2, 1025 kAbstractBit = 2,
1019 kPatchBit = 3, 1026 kPatchBit = 3,
1020 kSynthesizedClassBit = 4, 1027 kSynthesizedClassBit = 4,
1021 kTypeFinalizedBit = 5, 1028 kTypeFinalizedBit = 5,
1022 kStateTagBit = 6, 1029 kClassFinalizedBit = 6,
siva 2013/09/04 21:07:00 I think this should be kClassFinalizedBits as we h
regis 2013/09/04 22:14:27 Done.
1023 kStateTagSize = 2, 1030 kClassFinalizedSize = 2,
1024 kMarkedForParsingBit = 8, 1031 kMarkedForParsingBit = 8,
1025 kMixinTypedefBit = 9, 1032 kMixinTypedefBit = 9,
1033 kMixinTypeAppliedBit = 10,
1026 }; 1034 };
1027 class ConstBit : public BitField<bool, kConstBit, 1> {}; 1035 class ConstBit : public BitField<bool, kConstBit, 1> {};
1028 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {}; 1036 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
1029 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; 1037 class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
1030 class PatchBit : public BitField<bool, kPatchBit, 1> {}; 1038 class PatchBit : public BitField<bool, kPatchBit, 1> {};
1031 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {}; 1039 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {};
1032 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {}; 1040 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {};
1033 class StateBits : public BitField<RawClass::ClassState, 1041 class ClassFinalizedBits : public BitField<RawClass::ClassFinalizedState,
1034 kStateTagBit, kStateTagSize> {}; // NOLINT 1042 kClassFinalizedBit, kClassFinalizedSize> {}; // NOLINT
1035 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {}; 1043 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {};
1036 class MixinTypedefBit : public BitField<bool, kMixinTypedefBit, 1> {}; 1044 class MixinTypedefBit : public BitField<bool, kMixinTypedefBit, 1> {};
1045 class MixinTypeAppliedBit : public BitField<bool, kMixinTypeAppliedBit, 1> {};
1037 1046
1038 void set_name(const String& value) const; 1047 void set_name(const String& value) const;
1039 void set_signature_function(const Function& value) const; 1048 void set_signature_function(const Function& value) const;
1040 void set_signature_type(const AbstractType& value) const; 1049 void set_signature_type(const AbstractType& value) const;
1041 void set_class_state(RawClass::ClassState state) const;
1042 void set_state_bits(intptr_t bits) const; 1050 void set_state_bits(intptr_t bits) const;
1043 1051
1044 void set_constants(const Array& value) const; 1052 void set_constants(const Array& value) const;
1045 1053
1046 void set_canonical_types(const Array& value) const; 1054 void set_canonical_types(const Array& value) const;
1047 RawArray* canonical_types() const; 1055 RawArray* canonical_types() const;
1048 1056
1049 RawArray* invocation_dispatcher_cache() const; 1057 RawArray* invocation_dispatcher_cache() const;
1050 void set_invocation_dispatcher_cache(const Array& cache) const; 1058 void set_invocation_dispatcher_cache(const Array& cache) const;
1051 RawFunction* CreateInvocationDispatcher(const String& target_name, 1059 RawFunction* CreateInvocationDispatcher(const String& target_name,
(...skipping 5100 matching lines...) Expand 10 before | Expand all | Expand 10 after
6152 6160
6153 6161
6154 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6162 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6155 intptr_t index) { 6163 intptr_t index) {
6156 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6164 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6157 } 6165 }
6158 6166
6159 } // namespace dart 6167 } // namespace dart
6160 6168
6161 #endif // VM_OBJECT_H_ 6169 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698