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

Side by Side Diff: pkg/compiler/lib/src/universe/resolution_world_builder.dart

Issue 2850143002: Reuse RuntimeTypesNeedBuilderImpl and _RuntimeTypesNeed for kernel based elements (Closed)
Patch Set: Fix comment Created 3 years, 7 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 part of world_builder; 5 part of world_builder;
6 6
7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld { 7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld {
8 /// Set of all local functions in the program. Used by the mirror tracking 8 /// Set of all local functions in the program. Used by the mirror tracking
9 /// system to find all live closure instances. 9 /// system to find all live closure instances.
10 Iterable<Local> get localFunctions; 10 Iterable<Local> get localFunctions;
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 _instanceMemberUsage.putIfAbsent(member, () { 705 _instanceMemberUsage.putIfAbsent(member, () {
706 bool isNative = _nativeBasicData.isNativeClass(cls); 706 bool isNative = _nativeBasicData.isNativeClass(cls);
707 _MemberUsage usage = new _MemberUsage(member, isNative: isNative); 707 _MemberUsage usage = new _MemberUsage(member, isNative: isNative);
708 EnumSet<MemberUse> useSet = new EnumSet<MemberUse>(); 708 EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
709 useSet.addAll(usage.appliedUse); 709 useSet.addAll(usage.appliedUse);
710 if (member.isField && isNative) { 710 if (member.isField && isNative) {
711 registerUsedElement(member); 711 registerUsedElement(member);
712 } 712 }
713 if (member.isFunction && 713 if (member.isFunction &&
714 member.name == Identifiers.call && 714 member.name == Identifiers.call &&
715 _elementEnvironment.getThisType(cls).typeArguments.isNotEmpty) { 715 _elementEnvironment.isGenericClass(cls)) {
716 closurizedMembersWithFreeTypeVariables.add(member); 716 closurizedMembersWithFreeTypeVariables.add(member);
717 } 717 }
718 718
719 if (_hasInvokedGetter(member)) { 719 if (_hasInvokedGetter(member)) {
720 useSet.addAll(usage.read()); 720 useSet.addAll(usage.read());
721 } 721 }
722 if (_hasInvocation(member)) { 722 if (_hasInvocation(member)) {
723 useSet.addAll(usage.invoke()); 723 useSet.addAll(usage.invoke());
724 } 724 }
725 if (hasInvokedSetter(member)) { 725 if (hasInvokedSetter(member)) {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 typesImplementedBySubclasses: typesImplementedBySubclasses, 939 typesImplementedBySubclasses: typesImplementedBySubclasses,
940 classHierarchyNodes: _classHierarchyNodes, 940 classHierarchyNodes: _classHierarchyNodes,
941 classSets: _classSets); 941 classSets: _classSets);
942 } 942 }
943 943
944 @override 944 @override
945 void registerClass(ClassEntity cls) { 945 void registerClass(ClassEntity cls) {
946 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass'); 946 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass');
947 } 947 }
948 } 948 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698