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

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

Issue 1376863004: Avoid eager enqueueing from resolution (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix deferred+mirrors bug. 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.compute_members; 5 library dart2js.resolution.compute_members;
6 6
7 import '../common/names.dart' show 7 import '../common/names.dart' show
8 Identifiers; 8 Identifiers;
9 import '../common/resolution.dart' show 9 import '../common/resolution.dart' show
10 Resolution; 10 Resolution;
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 /// If `true` interface members are the non-static class member. 846 /// If `true` interface members are the non-static class member.
847 bool interfaceMembersAreClassMembers = true; 847 bool interfaceMembersAreClassMembers = true;
848 848
849 Map<Name, Member> classMembers; 849 Map<Name, Member> classMembers;
850 Map<Name, MemberSignature> interfaceMembers; 850 Map<Name, MemberSignature> interfaceMembers;
851 851
852 /// Creates the necessary maps and [MembersCreator] for compute members of 852 /// Creates the necessary maps and [MembersCreator] for compute members of
853 /// this class. 853 /// this class.
854 MembersCreator _prepareCreator(Compiler compiler) { 854 MembersCreator _prepareCreator(Compiler compiler) {
855 if (classMembers == null) { 855 if (classMembers == null) {
856 ensureResolved(compiler.resolution);
856 classMembers = new Map<Name, Member>(); 857 classMembers = new Map<Name, Member>();
857 858
858 if (interfaceMembersAreClassMembers) { 859 if (interfaceMembersAreClassMembers) {
859 ClassMemberMixin superclass = this.superclass; 860 ClassMemberMixin superclass = this.superclass;
860 if ((superclass != null && 861 if ((superclass != null &&
861 (!superclass.interfaceMembersAreClassMembers || 862 (!superclass.interfaceMembersAreClassMembers ||
862 superclass.isMixinApplication)) || 863 superclass.isMixinApplication)) ||
863 !interfaces.isEmpty) { 864 !interfaces.isEmpty) {
864 interfaceMembersAreClassMembers = false; 865 interfaceMembersAreClassMembers = false;
865 } 866 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 message: "Members have not been fully computed for $this.")); 953 message: "Members have not been fully computed for $this."));
953 if (interfaceMembersAreClassMembers) { 954 if (interfaceMembersAreClassMembers) {
954 classMembers.forEach((_, member) { 955 classMembers.forEach((_, member) {
955 if (!member.isStatic) f(member); 956 if (!member.isStatic) f(member);
956 }); 957 });
957 } else { 958 } else {
958 interfaceMembers.forEach((_, member) => f(member)); 959 interfaceMembers.forEach((_, member) => f(member));
959 } 960 }
960 } 961 }
961 } 962 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_backend.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698