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

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

Issue 1414913002: Introduce .isMalformed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review Created 5 years, 2 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
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.dart'; 7 import 'common.dart';
8 import 'common/backend_api.dart' show 8 import 'common/backend_api.dart' show
9 Backend; 9 Backend;
10 import 'common/tasks.dart' show 10 import 'common/tasks.dart' show
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 /// Finds all elements and constants that [element] depends directly on. 252 /// Finds all elements and constants that [element] depends directly on.
253 /// (not the transitive closure.) 253 /// (not the transitive closure.)
254 /// 254 ///
255 /// Adds the results to [elements] and [constants]. 255 /// Adds the results to [elements] and [constants].
256 void _collectAllElementsAndConstantsResolvedFrom( 256 void _collectAllElementsAndConstantsResolvedFrom(
257 Element element, 257 Element element,
258 Set<Element> elements, 258 Set<Element> elements,
259 Set<ConstantValue> constants, 259 Set<ConstantValue> constants,
260 isMirrorUsage) { 260 isMirrorUsage) {
261 261
262 if (element.isErroneous) { 262 if (element.isMalformed) {
263 // Erroneous elements are ignored. 263 // Malformed elements are ignored.
264 return; 264 return;
265 } 265 }
266 266
267 /// Recursively collects all the dependencies of [type]. 267 /// Recursively collects all the dependencies of [type].
268 void collectTypeDependencies(DartType type) { 268 void collectTypeDependencies(DartType type) {
269 // TODO(het): we would like to separate out types that are only needed for 269 // TODO(het): we would like to separate out types that are only needed for
270 // rti from types that are needed for their members. 270 // rti from types that are needed for their members.
271 if (type is GenericType) { 271 if (type is GenericType) {
272 type.typeArguments.forEach(collectTypeDependencies); 272 type.typeArguments.forEach(collectTypeDependencies);
273 } 273 }
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 return result; 982 return result;
983 } 983 }
984 984
985 bool operator ==(other) { 985 bool operator ==(other) {
986 if (other is! _DeclaredDeferredImport) return false; 986 if (other is! _DeclaredDeferredImport) return false;
987 return declaration == other.declaration; 987 return declaration == other.declaration;
988 } 988 }
989 989
990 int get hashCode => declaration.hashCode * 17; 990 int get hashCode => declaration.hashCode * 17;
991 } 991 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/renamer.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698