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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1629553002: List constructor sentinel must not implement 'int' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index 68e7e4ede814002bff1765b7b000b41cd87e1ece..f256d75a49203c1e140d91b24ed81c03f50dc3dd 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -1905,7 +1905,10 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
List<ir.Primitive> arguments = argumentsNode.nodes.mapToList(visit);
// Use default values from the effective target, not the immediate target.
- ConstructorElement target = constructor.effectiveTarget;
+ ConstructorElement target = constructor.implementation;
+ while (target.isRedirectingFactory && !target.isCyclicRedirection) {
+ target = target.effectiveTarget.implementation;
+ }
callStructure = normalizeStaticArguments(callStructure, target, arguments);
TypeMask allocationSiteType;
@@ -1916,10 +1919,11 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
Elements.isConstructorOfTypedArraySubclass(constructor, compiler)) {
allocationSiteType = getAllocationSiteType(send);
}
+ ConstructorElement constructorImplementation = constructor.implementation;
return irBuilder.buildConstructorInvocation(
target,
callStructure,
- constructor.computeEffectiveTargetType(type),
+ constructorImplementation.computeEffectiveTargetType(type),
arguments,
sourceInformationBuilder.buildNew(node),
allocationSiteType: allocationSiteType);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698