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

Side by Side Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 1327123003: Fix crash when deferred loading would encounter an unresolved super setter. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | tests/language/deferred_super_dependency_lib.dart » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library deferred_load; 5 library deferred_load;
6 6
7 import 'common/backend_api.dart' show 7 import 'common/backend_api.dart' show
8 Backend; 8 Backend;
9 import 'common/tasks.dart' show 9 import 'common/tasks.dart' show
10 CompilerTask; 10 CompilerTask;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 /// Finds all elements and constants that [element] depends directly on. 239 /// Finds all elements and constants that [element] depends directly on.
240 /// (not the transitive closure.) 240 /// (not the transitive closure.)
241 /// 241 ///
242 /// Adds the results to [elements] and [constants]. 242 /// Adds the results to [elements] and [constants].
243 void _collectAllElementsAndConstantsResolvedFrom( 243 void _collectAllElementsAndConstantsResolvedFrom(
244 Element element, 244 Element element,
245 Set<Element> elements, 245 Set<Element> elements,
246 Set<ConstantValue> constants, 246 Set<ConstantValue> constants,
247 isMirrorUsage) { 247 isMirrorUsage) {
248 248
249 if (element.isErroneous) {
250 // Erroneous elements are ignored.
251 return;
252 }
253
249 /// Recursively collects all the dependencies of [type]. 254 /// Recursively collects all the dependencies of [type].
250 void collectTypeDependencies(DartType type) { 255 void collectTypeDependencies(DartType type) {
251 if (type is GenericType) { 256 if (type is GenericType) {
252 type.typeArguments.forEach(collectTypeDependencies); 257 type.typeArguments.forEach(collectTypeDependencies);
253 } 258 }
254 if (type is FunctionType) { 259 if (type is FunctionType) {
255 for (DartType argumentType in type.parameterTypes) { 260 for (DartType argumentType in type.parameterTypes) {
256 collectTypeDependencies(argumentType); 261 collectTypeDependencies(argumentType);
257 } 262 }
258 for (DartType argumentType in type.optionalParameterTypes) { 263 for (DartType argumentType in type.optionalParameterTypes) {
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 _importingLibrary = importingLibrary; 889 _importingLibrary = importingLibrary;
885 890
886 String get importingLibraryName { 891 String get importingLibraryName {
887 String libraryName = _importingLibrary.getLibraryName(); 892 String libraryName = _importingLibrary.getLibraryName();
888 return libraryName == "" 893 return libraryName == ""
889 ? "<unnamed>" 894 ? "<unnamed>"
890 : libraryName; 895 : libraryName;
891 } 896 }
892 897
893 } 898 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/deferred_super_dependency_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698