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

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

Issue 2624543002: Update assertion in finalizer (Closed)
Patch Set: Keep the assertion, actually Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 2511
2512 const Class& mixin_app_class = Class::Handle(cls.SuperClass()); 2512 const Class& mixin_app_class = Class::Handle(cls.SuperClass());
2513 const Type& mixin_type = Type::Handle(mixin_app_class.mixin()); 2513 const Type& mixin_type = Type::Handle(mixin_app_class.mixin());
2514 const Class& mixin_cls = Class::Handle(mixin_type.type_class()); 2514 const Class& mixin_cls = Class::Handle(mixin_type.type_class());
2515 2515
2516 CreateForwardingConstructors(cls, mixin_cls, cloned_funcs); 2516 CreateForwardingConstructors(cls, mixin_cls, cloned_funcs);
2517 const Array& functions = Array::Handle(Array::MakeArray(cloned_funcs)); 2517 const Array& functions = Array::Handle(Array::MakeArray(cloned_funcs));
2518 cls.SetFunctions(functions); 2518 cls.SetFunctions(functions);
2519 } 2519 }
2520 // Every class should have at least a constructor, unless it is a top level 2520 // Every class should have at least a constructor, unless it is a top level
2521 // class or a typedef class. 2521 // class or a typedef class. The Kernel frontend does not create an implicit
2522 ASSERT(cls.IsTopLevel() || cls.IsTypedefClass() || 2522 // constructor for abstract classes.
2523 ASSERT(cls.IsTopLevel() || cls.IsTypedefClass() || cls.is_abstract() ||
2523 (Array::Handle(cls.functions()).Length() > 0)); 2524 (Array::Handle(cls.functions()).Length() > 0));
2524 // Resolve and finalize all member types. 2525 // Resolve and finalize all member types.
2525 ResolveAndFinalizeMemberTypes(cls); 2526 ResolveAndFinalizeMemberTypes(cls);
2526 // Run additional checks after all types are finalized. 2527 // Run additional checks after all types are finalized.
2527 if (cls.is_const()) { 2528 if (cls.is_const()) {
2528 CheckForLegalConstClass(cls); 2529 CheckForLegalConstClass(cls);
2529 } 2530 }
2530 if (FLAG_use_cha_deopt) { 2531 if (FLAG_use_cha_deopt) {
2531 GrowableArray<intptr_t> cids; 2532 GrowableArray<intptr_t> cids;
2532 CollectFinalizedSuperClasses(cls, &cids); 2533 CollectFinalizedSuperClasses(cls, &cids);
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
3390 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); 3391 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields());
3391 field ^= fields_array.At(0); 3392 field ^= fields_array.At(0);
3392 ASSERT(field.Offset() == ByteBuffer::data_offset()); 3393 ASSERT(field.Offset() == ByteBuffer::data_offset());
3393 name ^= field.name(); 3394 name ^= field.name();
3394 expected_name ^= String::New("_data"); 3395 expected_name ^= String::New("_data");
3395 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 3396 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3396 #endif 3397 #endif
3397 } 3398 }
3398 3399
3399 } // namespace dart 3400 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698