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

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

Issue 2554323002: Remove ResolutionEnqueuer._applyFirstMemberUse (Closed)
Patch Set: dartfmt Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 universe; 5 library universe;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import '../cache_strategy.dart'; 9 import '../cache_strategy.dart';
10 import '../common.dart'; 10 import '../common.dart';
11 import '../common/backend_api.dart' show Backend; 11 import '../common/backend_api.dart' show Backend;
12 import '../common/names.dart' show Identifiers;
12 import '../common/resolution.dart' show Resolution; 13 import '../common/resolution.dart' show Resolution;
13 import '../compiler.dart' show Compiler; 14 import '../compiler.dart' show Compiler;
14 import '../core_types.dart' show CoreClasses;
15 import '../dart_types.dart'; 15 import '../dart_types.dart';
16 import '../elements/elements.dart'; 16 import '../elements/elements.dart';
17 import '../elements/entities.dart'; 17 import '../elements/entities.dart';
18 import '../universe/class_set.dart' show Instantiation; 18 import '../universe/class_set.dart' show Instantiation;
19 import '../util/enumset.dart'; 19 import '../util/enumset.dart';
20 import '../util/util.dart'; 20 import '../util/util.dart';
21 import '../world.dart' show World, ClosedWorld, OpenWorld, WorldImpl; 21 import '../world.dart' show World, ClosedWorld, OpenWorld, WorldImpl;
22 import 'selector.dart' show Selector; 22 import 'selector.dart' show Selector;
23 import 'use.dart' show DynamicUse, DynamicUseKind, StaticUse, StaticUseKind; 23 import 'use.dart' show DynamicUse, DynamicUseKind, StaticUse, StaticUseKind;
24 24
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 // its metadata parsed and analyzed. 852 // its metadata parsed and analyzed.
853 // Note: this assumes that there are no non-native fields on native 853 // Note: this assumes that there are no non-native fields on native
854 // classes, which may not be the case when a native class is subclassed. 854 // classes, which may not be the case when a native class is subclassed.
855 bool isNative = _backend.isNative(cls); 855 bool isNative = _backend.isNative(cls);
856 _MemberUsage usage = _instanceMemberUsage.putIfAbsent(member, () { 856 _MemberUsage usage = _instanceMemberUsage.putIfAbsent(member, () {
857 _MemberUsage usage = new _MemberUsage(member, isNative: isNative); 857 _MemberUsage usage = new _MemberUsage(member, isNative: isNative);
858 useSet.addAll(usage.appliedUse); 858 useSet.addAll(usage.appliedUse);
859 if (member.isField && isNative) { 859 if (member.isField && isNative) {
860 _openWorld.registerUsedElement(member); 860 _openWorld.registerUsedElement(member);
861 } 861 }
862 if (member.isFunction &&
863 member.name == Identifiers.call &&
864 !cls.typeVariables.isEmpty) {
865 callMethodsWithFreeTypeVariables.add(member);
866 }
862 867
863 if (_hasInvokedGetter(member)) { 868 if (_hasInvokedGetter(member)) {
864 useSet.addAll(usage.read()); 869 useSet.addAll(usage.read());
865 } 870 }
866 if (_hasInvocation(member)) { 871 if (_hasInvocation(member)) {
867 useSet.addAll(usage.invoke()); 872 useSet.addAll(usage.invoke());
868 } 873 }
869 if (hasInvokedSetter(member)) { 874 if (hasInvokedSetter(member)) {
870 useSet.addAll(usage.write()); 875 useSet.addAll(usage.write());
871 } 876 }
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 if (hasClosurization) { 1520 if (hasClosurization) {
1516 return MemberUses.NONE; 1521 return MemberUses.NONE;
1517 } 1522 }
1518 hasNormalUse = hasClosurization = true; 1523 hasNormalUse = hasClosurization = true;
1519 return _pendingUse.removeAll(MemberUses.ALL); 1524 return _pendingUse.removeAll(MemberUses.ALL);
1520 } 1525 }
1521 1526
1522 @override 1527 @override
1523 EnumSet<MemberUse> get _originalUse => MemberUses.ALL; 1528 EnumSet<MemberUse> get _originalUse => MemberUses.ALL;
1524 } 1529 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698