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

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

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/object.h ('k') | tests/co19/co19-dartium.status » ('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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 3097 matching lines...) Expand 10 before | Expand all | Expand 10 after
3108 void Class::set_is_mixin_type_applied() const { 3108 void Class::set_is_mixin_type_applied() const {
3109 set_state_bits(MixinTypeAppliedBit::update(true, raw_ptr()->state_bits_)); 3109 set_state_bits(MixinTypeAppliedBit::update(true, raw_ptr()->state_bits_));
3110 } 3110 }
3111 3111
3112 3112
3113 void Class::set_is_fields_marked_nullable() const { 3113 void Class::set_is_fields_marked_nullable() const {
3114 set_state_bits(FieldsMarkedNullableBit::update(true, raw_ptr()->state_bits_)); 3114 set_state_bits(FieldsMarkedNullableBit::update(true, raw_ptr()->state_bits_));
3115 } 3115 }
3116 3116
3117 3117
3118 void Class::set_is_cycle_free() const {
3119 ASSERT(!is_cycle_free());
3120 set_state_bits(CycleFreeBit::update(true, raw_ptr()->state_bits_));
3121 }
3122
3123
3118 void Class::set_is_finalized() const { 3124 void Class::set_is_finalized() const {
3119 ASSERT(!is_finalized()); 3125 ASSERT(!is_finalized());
3120 set_state_bits(ClassFinalizedBits::update(RawClass::kFinalized, 3126 set_state_bits(ClassFinalizedBits::update(RawClass::kFinalized,
3121 raw_ptr()->state_bits_)); 3127 raw_ptr()->state_bits_));
3122 } 3128 }
3123 3129
3124 3130
3125 void Class::set_is_prefinalized() const { 3131 void Class::set_is_prefinalized() const {
3126 ASSERT(!is_finalized()); 3132 ASSERT(!is_finalized());
3127 set_state_bits(ClassFinalizedBits::update(RawClass::kPreFinalized, 3133 set_state_bits(ClassFinalizedBits::update(RawClass::kPreFinalized,
3128 raw_ptr()->state_bits_)); 3134 raw_ptr()->state_bits_));
3129 } 3135 }
3130 3136
3131 3137
3132 void Class::set_is_marked_for_parsing() const { 3138 void Class::set_is_marked_for_parsing() const {
3133 set_state_bits(MarkedForParsingBit::update(true, raw_ptr()->state_bits_)); 3139 set_state_bits(MarkedForParsingBit::update(true, raw_ptr()->state_bits_));
3134 } 3140 }
3135 3141
3136 3142
3137 void Class::reset_is_marked_for_parsing() const { 3143 void Class::reset_is_marked_for_parsing() const {
3138 set_state_bits(MarkedForParsingBit::update(false, raw_ptr()->state_bits_)); 3144 set_state_bits(MarkedForParsingBit::update(false, raw_ptr()->state_bits_));
3139 } 3145 }
3140 3146
3141 3147
3142 void Class::set_interfaces(const Array& value) const { 3148 void Class::set_interfaces(const Array& value) const {
3143 // Verification and resolving of interfaces occurs in finalizer.
3144 ASSERT(!value.IsNull()); 3149 ASSERT(!value.IsNull());
3145 StorePointer(&raw_ptr()->interfaces_, value.raw()); 3150 StorePointer(&raw_ptr()->interfaces_, value.raw());
3146 } 3151 }
3147 3152
3148 3153
3149 void Class::set_mixin(const Type& value) const { 3154 void Class::set_mixin(const Type& value) const {
3150 ASSERT(!value.IsNull()); 3155 ASSERT(!value.IsNull());
3151 StorePointer(&raw_ptr()->mixin_, value.raw()); 3156 StorePointer(&raw_ptr()->mixin_, value.raw());
3152 } 3157 }
3153 3158
(...skipping 14205 matching lines...) Expand 10 before | Expand all | Expand 10 after
17359 return "_MirrorReference"; 17364 return "_MirrorReference";
17360 } 17365 }
17361 17366
17362 17367
17363 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 17368 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
17364 Instance::PrintToJSONStream(stream, ref); 17369 Instance::PrintToJSONStream(stream, ref);
17365 } 17370 }
17366 17371
17367 17372
17368 } // namespace dart 17373 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | tests/co19/co19-dartium.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698