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

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

Issue 2807593002: Use entities in impact transformers. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/universe/element_world_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/resolution_world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index cd2593ed383f7d8bd73dd1d639fa60d515e54818..ff1057bc522af1974fabe17ec02f9f2621c907d6 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -565,6 +565,17 @@ abstract class ResolutionWorldBuilderBase
}
void registerStaticUse(StaticUse staticUse, MemberUsedCallback memberUsed) {
+ if (staticUse.kind == StaticUseKind.CLOSURE) {
+ Local localFunction = staticUse.element;
+ FunctionType type =
+ _elementEnvironment.getLocalFunctionType(localFunction);
+ if (type.containsTypeVariables) {
+ localFunctionsWithFreeTypeVariables.add(localFunction);
+ }
+ localFunctions.add(staticUse.element);
+ return;
+ }
+
MemberEntity element = staticUse.element;
_StaticMemberUsage usage = _staticMemberUsage.putIfAbsent(element, () {
if ((element.isStatic || element.isTopLevel) && element.isFunction) {
@@ -589,8 +600,8 @@ abstract class ResolutionWorldBuilderBase
fieldSetters.add(staticUse.element);
break;
case StaticUseKind.CLOSURE:
- throw new UnimplementedError(
- "registerStaticUse not implemented for StaticUseKind.CLOSURE.");
+ // Already handled above.
+ break;
case StaticUseKind.SUPER_TEAR_OFF:
useSet.addAll(usage.tearOff());
methodsNeedingSuperGetter.add(staticUse.element);
« no previous file with comments | « pkg/compiler/lib/src/universe/element_world_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698