Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
index edaff49a8ffc4c7c82028a461fb9e8ccade14f37..a3961539821fa4c87beee1abb8bebee7b587bfb0 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
@@ -3788,6 +3788,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
handleNewSend(NewExpression node) { |
Send send = node.send; |
+ bool isListConstructor = false; |
bool isFixedList = false; |
TypeMask computeType(element) { |
@@ -3795,6 +3796,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
if (Elements.isFixedListConstructorCall(originalElement, send, compiler) |
|| Elements.isFilledListConstructorCall( |
originalElement, send, compiler)) { |
+ isListConstructor = true; |
isFixedList = true; |
TypeMask inferred = |
TypeMaskFactory.inferredForNode(currentElement, send, compiler); |
@@ -3803,6 +3805,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
: inferred; |
} else if (Elements.isGrowableListConstructorCall( |
originalElement, send, compiler)) { |
+ isListConstructor = true; |
TypeMask inferred = |
TypeMaskFactory.inferredForNode(currentElement, send, compiler); |
return inferred.containsAll(compiler) |
@@ -3833,8 +3836,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
final bool isSymbolConstructor = |
functionElement == compiler.symbolConstructor; |
- final bool isJSArrayTypedConstructor = |
- functionElement == backend.jsArrayTypedConstructor; |
if (isSymbolConstructor) { |
constructor = compiler.symbolValidatedConstructor; |
@@ -3900,8 +3901,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
// not know about the type argument. Therefore we special case |
// this constructor to have the setRuntimeTypeInfo called where |
// the 'new' is done. |
- if (isJSArrayTypedConstructor && |
- backend.classNeedsRti(compiler.listClass)) { |
+ if (isListConstructor && backend.classNeedsRti(compiler.listClass)) { |
handleListConstructor(type, send, newInstance); |
} |