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

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

Issue 1395183004: dart2js: mark FunctionElements as dependencies always (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // TODO(sigurdm): How is metadata on a patch-class handled? 335 // TODO(sigurdm): How is metadata on a patch-class handled?
336 for (MetadataAnnotation metadata in element.metadata) { 336 for (MetadataAnnotation metadata in element.metadata) {
337 ConstantValue constant = 337 ConstantValue constant =
338 backend.constants.getConstantValueForMetadata(metadata); 338 backend.constants.getConstantValueForMetadata(metadata);
339 if (constant != null) { 339 if (constant != null) {
340 constants.add(constant); 340 constants.add(constant);
341 } 341 }
342 } 342 }
343 343
344 if (element is FunctionElement && 344 if (element is FunctionElement) {
345 compiler.resolverWorld.closurizedMembers.contains(element)) {
Siggi Cherem (dart-lang) 2015/10/12 22:53:28 mmm - would this pull in more than needed? Seems l
Harry Terkelsen 2015/10/13 17:27:34 The class to superclass dependency is handled here
Siggi Cherem (dart-lang) 2015/10/13 20:16:29 Thanks for the pointer. Sorry for the confusion -
346 collectTypeDependencies(element.type); 345 collectTypeDependencies(element.type);
347 } 346 }
348 347
349 if (element.isClass) { 348 if (element.isClass) {
350 // If we see a class, add everything its live instance members refer 349 // If we see a class, add everything its live instance members refer
351 // to. Static members are not relevant, unless we are processing 350 // to. Static members are not relevant, unless we are processing
352 // extra dependencies due to mirrors. 351 // extra dependencies due to mirrors.
353 void addLiveInstanceMember(Element element) { 352 void addLiveInstanceMember(Element element) {
354 if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return; 353 if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return;
355 if (!isMirrorUsage && !element.isInstanceMember) return; 354 if (!isMirrorUsage && !element.isInstanceMember) return;
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 return result; 934 return result;
936 } 935 }
937 936
938 bool operator ==(other) { 937 bool operator ==(other) {
939 if (other is! _DeclaredDeferredImport) return false; 938 if (other is! _DeclaredDeferredImport) return false;
940 return declaration == other.declaration; 939 return declaration == other.declaration;
941 } 940 }
942 941
943 int get hashCode => declaration.hashCode * 17; 942 int get hashCode => declaration.hashCode * 17;
944 } 943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698