Index: runtime/vm/kernel_binary_flowgraph.cc |
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc |
index 37f596c4fa2535ec5c15ee3e6198bac1a1ef6388..ba593ffbffb4b0af87845998616f21526281408a 100644 |
--- a/runtime/vm/kernel_binary_flowgraph.cc |
+++ b/runtime/vm/kernel_binary_flowgraph.cc |
@@ -5696,15 +5696,18 @@ Fragment StreamingFlowGraphBuilder::BuildListLiteral(bool is_const, |
instructions += Constant(Object::empty_array()); |
} else { |
// The type arguments for CreateArray. |
- instructions += Constant(TypeArguments::ZoneHandle(Z)); |
+ instructions += Constant(type_arguments); |
instructions += IntConstant(length); |
instructions += CreateArray(); |
+ AbstractType& list_type = AbstractType::Handle(type_arguments.TypeAt(0)); |
Kevin Millikin (Google)
2017/06/19 15:01:17
Pass the zone argument Z so we don't have to get i
jensj
2017/06/20 10:43:30
Done.
|
LocalVariable* array = MakeTemporary(); |
for (intptr_t i = 0; i < length; ++i) { |
instructions += LoadLocal(array); |
instructions += IntConstant(i); |
instructions += BuildExpression(); // read ith expression. |
+ instructions += CheckAssignableInCheckedMode( |
+ list_type, Symbols::ListLiteralElement()); |
instructions += StoreIndexed(kArrayCid); |
instructions += Drop(); |
} |