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

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

Issue 162163002: Make cycle checking of super interfaces linear instead of quadratic by marking (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 bool is_mixin_type_applied() const { 985 bool is_mixin_type_applied() const {
986 return MixinTypeAppliedBit::decode(raw_ptr()->state_bits_); 986 return MixinTypeAppliedBit::decode(raw_ptr()->state_bits_);
987 } 987 }
988 void set_is_mixin_type_applied() const; 988 void set_is_mixin_type_applied() const;
989 989
990 bool is_fields_marked_nullable() const { 990 bool is_fields_marked_nullable() const {
991 return FieldsMarkedNullableBit::decode(raw_ptr()->state_bits_); 991 return FieldsMarkedNullableBit::decode(raw_ptr()->state_bits_);
992 } 992 }
993 void set_is_fields_marked_nullable() const; 993 void set_is_fields_marked_nullable() const;
994 994
995 bool is_cycle_free() const {
996 return CycleFreeBit::decode(raw_ptr()->state_bits_);
997 }
998 void set_is_cycle_free() const;
999
995 uint16_t num_native_fields() const { 1000 uint16_t num_native_fields() const {
996 return raw_ptr()->num_native_fields_; 1001 return raw_ptr()->num_native_fields_;
997 } 1002 }
998 void set_num_native_fields(uint16_t value) const { 1003 void set_num_native_fields(uint16_t value) const {
999 raw_ptr()->num_native_fields_ = value; 1004 raw_ptr()->num_native_fields_ = value;
1000 } 1005 }
1001 1006
1002 RawCode* allocation_stub() const { 1007 RawCode* allocation_stub() const {
1003 return raw_ptr()->allocation_stub_; 1008 return raw_ptr()->allocation_stub_;
1004 } 1009 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 kTypeFinalizedBit = 2, 1098 kTypeFinalizedBit = 2,
1094 kClassFinalizedBits = 3, 1099 kClassFinalizedBits = 3,
1095 kClassFinalizedSize = 2, 1100 kClassFinalizedSize = 2,
1096 kAbstractBit = 5, 1101 kAbstractBit = 5,
1097 kPatchBit = 6, 1102 kPatchBit = 6,
1098 kSynthesizedClassBit = 7, 1103 kSynthesizedClassBit = 7,
1099 kMarkedForParsingBit = 8, 1104 kMarkedForParsingBit = 8,
1100 kMixinAppAliasBit = 9, 1105 kMixinAppAliasBit = 9,
1101 kMixinTypeAppliedBit = 10, 1106 kMixinTypeAppliedBit = 10,
1102 kFieldsMarkedNullableBit = 11, 1107 kFieldsMarkedNullableBit = 11,
1108 kCycleFreeBit = 12,
1103 }; 1109 };
1104 class ConstBit : public BitField<bool, kConstBit, 1> {}; 1110 class ConstBit : public BitField<bool, kConstBit, 1> {};
1105 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {}; 1111 class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
1106 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {}; 1112 class TypeFinalizedBit : public BitField<bool, kTypeFinalizedBit, 1> {};
1107 class ClassFinalizedBits : public BitField<RawClass::ClassFinalizedState, 1113 class ClassFinalizedBits : public BitField<RawClass::ClassFinalizedState,
1108 kClassFinalizedBits, kClassFinalizedSize> {}; // NOLINT 1114 kClassFinalizedBits, kClassFinalizedSize> {}; // NOLINT
1109 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; 1115 class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
1110 class PatchBit : public BitField<bool, kPatchBit, 1> {}; 1116 class PatchBit : public BitField<bool, kPatchBit, 1> {};
1111 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {}; 1117 class SynthesizedClassBit : public BitField<bool, kSynthesizedClassBit, 1> {};
1112 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {}; 1118 class MarkedForParsingBit : public BitField<bool, kMarkedForParsingBit, 1> {};
1113 class MixinAppAliasBit : public BitField<bool, kMixinAppAliasBit, 1> {}; 1119 class MixinAppAliasBit : public BitField<bool, kMixinAppAliasBit, 1> {};
1114 class MixinTypeAppliedBit : public BitField<bool, kMixinTypeAppliedBit, 1> {}; 1120 class MixinTypeAppliedBit : public BitField<bool, kMixinTypeAppliedBit, 1> {};
1115 class FieldsMarkedNullableBit : public BitField<bool, 1121 class FieldsMarkedNullableBit : public BitField<bool,
1116 kFieldsMarkedNullableBit, 1> {}; // NOLINT 1122 kFieldsMarkedNullableBit, 1> {}; // NOLINT
1123 class CycleFreeBit : public BitField<bool, kCycleFreeBit, 1> {};
1117 1124
1118 void set_name(const String& value) const; 1125 void set_name(const String& value) const;
1119 void set_user_name(const String& value) const; 1126 void set_user_name(const String& value) const;
1120 RawString* GenerateUserVisibleName() const; 1127 RawString* GenerateUserVisibleName() const;
1121 void set_signature_function(const Function& value) const; 1128 void set_signature_function(const Function& value) const;
1122 void set_signature_type(const AbstractType& value) const; 1129 void set_signature_type(const AbstractType& value) const;
1123 void set_state_bits(intptr_t bits) const; 1130 void set_state_bits(intptr_t bits) const;
1124 1131
1125 void set_constants(const Array& value) const; 1132 void set_constants(const Array& value) const;
1126 1133
(...skipping 5484 matching lines...) Expand 10 before | Expand all | Expand 10 after
6611 6618
6612 6619
6613 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6620 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6614 intptr_t index) { 6621 intptr_t index) {
6615 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6622 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6616 } 6623 }
6617 6624
6618 } // namespace dart 6625 } // namespace dart
6619 6626
6620 #endif // VM_OBJECT_H_ 6627 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698