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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1424923004: Add StaticUse for more precise registration of statically known element use. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 1 month 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/resolution/resolution.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 58ea7cb5ff43060d73b5ac858bbc5d63289d85b6..42b57f107d1805189c651b3ce0e9533b727d4bc4 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -3236,7 +3236,7 @@ class SsaBuilder extends ast.Visitor
// TODO(ahe): This should be registered in codegen, not here.
// TODO(johnniwinther): Is [registerStaticUse] equivalent to
// [addToWorkList]?
- registry?.registerStaticUse(callElement);
+ registry?.registerStaticUse(new StaticUse.foreignUse(callElement));
List<HInstruction> capturedVariables = <HInstruction>[];
closureClassElement.closureFields.forEach((ClosureFieldElement field) {
@@ -4444,10 +4444,11 @@ class SsaBuilder extends ast.Visitor
'"$name" does not handle closure with optional parameters.');
}
- registry?.registerStaticUse(element);
+ registry?.registerStaticUse(
+ new StaticUse.foreignUse(function));
push(new HForeignCode(
js.js.expressionTemplateYielding(
- backend.emitter.staticFunctionAccess(element)),
+ backend.emitter.staticFunctionAccess(function)),
backend.dynamicType,
<HInstruction>[],
nativeBehavior: native.NativeBehavior.PURE));
@@ -4550,7 +4551,8 @@ class SsaBuilder extends ast.Visitor
// class is _not_ the default implementation from [Object], in
// case the [noSuchMethod] implementation calls
// [JSInvocationMirror._invokeOn].
- registry?.registerSelectorUse(selector);
+ // TODO(johnniwinther): Register this more precisely.
+ registry?.registerDynamicUse(new UniverseSelector(selector, null));
}
String publicName = name;
if (selector.isSetter) publicName += '=';
@@ -4989,7 +4991,7 @@ class SsaBuilder extends ast.Visitor
inputs.add(analyzeTypeArgument(argument));
});
// TODO(15489): Register at codegen.
- registry?.registerInstantiatedType(type);
+ registry?.registerInstantiation(type);
return callSetRuntimeTypeInfo(type.element, inputs, newObject);
}
@@ -7246,7 +7248,7 @@ class SsaBuilder extends ast.Visitor
arguments.add(analyzeTypeArgument(argument));
}
// TODO(15489): Register at codegen.
- registry?.registerInstantiatedType(type);
+ registry?.registerInstantiation(type);
return callSetRuntimeTypeInfo(type.element, arguments, object);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698