Chromium Code Reviews| 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); |
|
Harry Terkelsen
2016/10/07 15:53:21
just a heads up: I think we are planning to remove
Johnni Winther
2016/10/10 09:58:12
Acknowledged.
|
| + break; |
| + default: |
| } |
| } |