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

Unified Diff: pkg/compiler/lib/src/universe/world_builder.dart

Issue 2549423002: Change Enqueuer to use Entity instead of Element. (Closed)
Patch Set: Updated cf. comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/universe/world_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index bd07cc8601cd55cbf02d0cbb13a02fe92009b6e4..f7683986429ce451043d9a0e9b04ce2738e6bbe8 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -721,22 +721,22 @@ class ResolutionWorldBuilderImpl implements ResolutionWorldBuilder {
}
}
- void forgetElement(Element element, Compiler compiler) {
- allClosures.remove(element);
- slowDirectlyNestedClosures(element).forEach(compiler.forgetElement);
- closurizedMembers.remove(element);
- fieldSetters.remove(element);
- _instantiationInfo.remove(element);
-
- void removeUsage(Set<_MemberUsage> set, Element element) {
+ void forgetEntity(Entity entity, Compiler compiler) {
+ allClosures.remove(entity);
+ slowDirectlyNestedClosures(entity).forEach(compiler.forgetElement);
+ closurizedMembers.remove(entity);
+ fieldSetters.remove(entity);
+ _instantiationInfo.remove(entity);
+
+ void removeUsage(Set<_MemberUsage> set, Entity entity) {
if (set == null) return;
set.removeAll(
- set.where((_MemberUsage usage) => usage.entity == element).toList());
+ set.where((_MemberUsage usage) => usage.entity == entity).toList());
}
- _processedClasses.remove(element);
- removeUsage(_instanceMembersByName[element.name], element);
- removeUsage(_instanceFunctionsByName[element.name], element);
+ _processedClasses.remove(entity);
+ removeUsage(_instanceMembersByName[entity.name], entity);
+ removeUsage(_instanceFunctionsByName[entity.name], entity);
}
// TODO(ahe): Replace this method with something that is O(1), for example,
@@ -808,7 +808,8 @@ class ResolutionWorldBuilderImpl implements ResolutionWorldBuilder {
_processSet(_instanceMembersByName, name, updateUsage);
}
- void _processInstanceFunctions(String name, bool updateUsage(_MemberUsage e)) {
+ void _processInstanceFunctions(
+ String name, bool updateUsage(_MemberUsage e)) {
_processSet(_instanceFunctionsByName, name, updateUsage);
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/universe/world_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698