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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2392943003: Handle const constructor invocation in kernel_impact. (Closed)
Patch Set: Updated cf. comments. Created 4 years, 2 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/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index bf9c1ab7b4190114223e2daefac81fe1f8e8c019..eeefe580d6703274a722ceff70f73c06092bc009 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2951,14 +2951,21 @@ class JavaScriptImpactTransformer extends ImpactTransformer {
}
for (StaticUse staticUse in worldImpact.staticUses) {
- if (staticUse.kind == StaticUseKind.CLOSURE) {
- registerBackendImpact(transformed, impacts.closure);
- LocalFunctionElement closure = staticUse.element;
- if (closure.type.containsTypeVariables) {
- resolutionEnqueuer.universe.closuresWithFreeTypeVariables
- .add(closure);
- registerBackendImpact(transformed, impacts.computeSignature);
- }
+ switch (staticUse.kind) {
+ case StaticUseKind.CLOSURE:
+ registerBackendImpact(transformed, impacts.closure);
+ LocalFunctionElement closure = staticUse.element;
+ if (closure.type.containsTypeVariables) {
+ resolutionEnqueuer.universe.closuresWithFreeTypeVariables
+ .add(closure);
+ registerBackendImpact(transformed, impacts.computeSignature);
+ }
+ break;
+ case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
+ case StaticUseKind.CONSTRUCTOR_INVOKE:
+ registerRequiredType(staticUse.type);
+ break;
+ default:
}
}
@@ -3144,11 +3151,18 @@ class JavaScriptImpactTransformer extends ImpactTransformer {
}
for (StaticUse staticUse in impact.staticUses) {
- if (staticUse.kind == StaticUseKind.CLOSURE) {
- LocalFunctionElement closure = staticUse.element;
- if (backend.methodNeedsRti(closure)) {
- registerBackendImpact(transformed, impacts.computeSignature);
- }
+ switch (staticUse.kind) {
+ case StaticUseKind.CLOSURE:
+ LocalFunctionElement closure = staticUse.element;
+ if (backend.methodNeedsRti(closure)) {
+ registerBackendImpact(transformed, impacts.computeSignature);
+ }
+ break;
+ case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
+ case StaticUseKind.CONSTRUCTOR_INVOKE:
+ backend.lookupMapAnalysis.registerInstantiatedType(staticUse.type);
+ break;
+ default:
}
}
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698