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

Side by Side Diff: pkg/compiler/lib/src/resolution/resolution_strategy.dart

Issue 2968383002: Add ConstructorBodyEntity (Closed)
Patch Set: Skip non-live constructor bodies Created 3 years, 5 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 dart2js.resolution_strategy; 5 library dart2js.resolution_strategy;
6 6
7 import 'package:front_end/src/fasta/scanner.dart' show Token; 7 import 'package:front_end/src/fasta/scanner.dart' show Token;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common_elements.dart'; 10 import '../common_elements.dart';
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 covariant ClassElement cls, void f(ConstructorEntity constructor)) { 513 covariant ClassElement cls, void f(ConstructorEntity constructor)) {
514 cls.ensureResolved(_resolution); 514 cls.ensureResolved(_resolution);
515 for (ConstructorElement constructor in cls.implementation.constructors) { 515 for (ConstructorElement constructor in cls.implementation.constructors) {
516 _resolution.ensureResolved(constructor.declaration); 516 _resolution.ensureResolved(constructor.declaration);
517 if (constructor.isRedirectingFactory) continue; 517 if (constructor.isRedirectingFactory) continue;
518 f(constructor); 518 f(constructor);
519 } 519 }
520 } 520 }
521 521
522 @override 522 @override
523 void forEachConstructorBody(
524 covariant ClassElement cls, void f(ConstructorBodyEntity constructor)) {
525 cls.forEachConstructorBody(f);
526 }
527
528 @override
523 ClassEntity getSuperClass(covariant ClassElement cls, 529 ClassEntity getSuperClass(covariant ClassElement cls,
524 {bool skipUnnamedMixinApplications: false}) { 530 {bool skipUnnamedMixinApplications: false}) {
525 cls.ensureResolved(_resolution); 531 cls.ensureResolved(_resolution);
526 ClassElement superclass = cls.superclass; 532 ClassElement superclass = cls.superclass;
527 if (skipUnnamedMixinApplications) { 533 if (skipUnnamedMixinApplications) {
528 while (superclass != null && superclass.isUnnamedMixinApplication) { 534 while (superclass != null && superclass.isUnnamedMixinApplication) {
529 superclass = superclass.superclass; 535 superclass = superclass.superclass;
530 } 536 }
531 } 537 }
532 return superclass; 538 return superclass;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 @override 878 @override
873 WorkItem createWorkItem(MemberElement element) { 879 WorkItem createWorkItem(MemberElement element) {
874 assert(element.isDeclaration, failedAt(element)); 880 assert(element.isDeclaration, failedAt(element));
875 if (element.isMalformed) return null; 881 if (element.isMalformed) return null;
876 882
877 assert(element is AnalyzableElement, 883 assert(element is AnalyzableElement,
878 failedAt(element, 'Element $element is not analyzable.')); 884 failedAt(element, 'Element $element is not analyzable.'));
879 return _resolution.createWorkItem(element); 885 return _resolution.createWorkItem(element);
880 } 886 }
881 } 887 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698