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

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

Issue 23190035: Distinguish between malformed and malbounded types (fix issues 12552 and 12554). (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
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/code_generator.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) 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/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static void CollectFinalizedSuperClasses( 91 static void CollectFinalizedSuperClasses(
92 const GrowableObjectArray& pending_classes, 92 const GrowableObjectArray& pending_classes,
93 GrowableArray<intptr_t>* finalized_super_classes) { 93 GrowableArray<intptr_t>* finalized_super_classes) {
94 Class& cls = Class::Handle(); 94 Class& cls = Class::Handle();
95 AbstractType& super_type = Type::Handle(); 95 AbstractType& super_type = Type::Handle();
96 for (intptr_t i = 0; i < pending_classes.Length(); i++) { 96 for (intptr_t i = 0; i < pending_classes.Length(); i++) {
97 cls ^= pending_classes.At(i); 97 cls ^= pending_classes.At(i);
98 ASSERT(!cls.is_finalized()); 98 ASSERT(!cls.is_finalized());
99 super_type = cls.super_type(); 99 super_type = cls.super_type();
100 if (!super_type.IsNull()) { 100 if (!super_type.IsNull()) {
101 if (!super_type.IsMalformed() && 101 if (!super_type.IsMalformed() && super_type.HasResolvedTypeClass()) {
102 super_type.HasResolvedTypeClass()) {
103 cls ^= super_type.type_class(); 102 cls ^= super_type.type_class();
104 if (cls.is_finalized()) { 103 if (cls.is_finalized()) {
105 AddSuperType(super_type, finalized_super_classes); 104 AddSuperType(super_type, finalized_super_classes);
106 } 105 }
107 } 106 }
108 } 107 }
109 } 108 }
110 } 109 }
111 110
112 111
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 expected_name ^= String::New("_offset"); 2322 expected_name ^= String::New("_offset");
2324 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 2323 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
2325 field ^= fields_array.At(2); 2324 field ^= fields_array.At(2);
2326 ASSERT(field.Offset() == TypedDataView::length_offset()); 2325 ASSERT(field.Offset() == TypedDataView::length_offset());
2327 name ^= field.name(); 2326 name ^= field.name();
2328 ASSERT(name.Equals("length")); 2327 ASSERT(name.Equals("length"));
2329 #endif 2328 #endif
2330 } 2329 }
2331 2330
2332 } // namespace dart 2331 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698