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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/universe/full_function_set.dart

Issue 15381002: Fix a pretty bad bug of a class inheriting a patched class. The fix is (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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) 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 part of universe; 5 part of universe;
6 6
7 class FullFunctionSet extends FunctionSet { 7 class FullFunctionSet extends FunctionSet {
8 FullFunctionSet(Compiler compiler) : super(compiler); 8 FullFunctionSet(Compiler compiler) : super(compiler);
9 9
10 FunctionSetNode newNode(SourceString name) 10 FunctionSetNode newNode(SourceString name)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 classes.add(enclosing); 52 classes.add(enclosing);
53 } 53 }
54 return classes; 54 return classes;
55 } 55 }
56 56
57 static bool isExactClass(List<ClassElement> classes, Compiler compiler) { 57 static bool isExactClass(List<ClassElement> classes, Compiler compiler) {
58 if (classes == null || classes.length != 1) return false; 58 if (classes == null || classes.length != 1) return false;
59 ClassElement single = classes[0]; 59 ClassElement single = classes[0];
60 // Return true if the single class in our list does not have a 60 // Return true if the single class in our list does not have a
61 // single instantiated subclass. 61 // single instantiated subclass.
62 Set<ClassElement> subtypes = compiler.world.subtypes[single]; 62 Set<ClassElement> subtypes = compiler.world.subtypesOf(single);
63 return subtypes == null 63 return subtypes == null
64 || subtypes.every((ClassElement each) => !each.isSubclassOf(single)); 64 || subtypes.every((ClassElement each) => !each.isSubclassOf(single));
65 } 65 }
66 } 66 }
67 67
68 class FullFunctionSetQuery extends FunctionSetQuery { 68 class FullFunctionSetQuery extends FunctionSetQuery {
69 final List<ClassElement> classes; 69 final List<ClassElement> classes;
70 final bool isExact; 70 final bool isExact;
71 FullFunctionSetQuery(List<Element> functions, this.classes, this.isExact) 71 FullFunctionSetQuery(List<Element> functions, this.classes, this.isExact)
72 : super(functions); 72 : super(functions);
73 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698