| Index: runtime/vm/flow_graph_builder.cc
|
| diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
|
| index 4f387f971414ebb17531c0859d5693006b903521..8abd46c0722c94478732ba217d7392e804e6ef02 100644
|
| --- a/runtime/vm/flow_graph_builder.cc
|
| +++ b/runtime/vm/flow_graph_builder.cc
|
| @@ -625,7 +625,19 @@ void EffectGraphVisitor::VisitArgumentListNode(ArgumentListNode* node) {
|
|
|
|
|
| void EffectGraphVisitor::VisitArrayNode(ArrayNode* node) {
|
| - Bailout("EffectGraphVisitor::VisitArrayNode");
|
| + // Translate the array elements and collect their values.
|
| + ZoneGrowableArray<Value*>* values =
|
| + new ZoneGrowableArray<Value*>(node->length());
|
| + int index = temp_index();
|
| + for (int i = 0; i < node->length(); ++i) {
|
| + ValueGraphVisitor for_value(owner(), index);
|
| + node->ElementAt(i)->Visit(&for_value);
|
| + Append(for_value);
|
| + values->Add(for_value.value());
|
| + index = for_value.temp_index();
|
| + }
|
| + CreateArrayComp* create = new CreateArrayComp(node, values);
|
| + ReturnComputation(create);
|
| }
|
|
|
|
|
| @@ -1097,6 +1109,17 @@ void FlowGraphPrinter::VisitInstanceOf(InstanceOfComp* comp) {
|
| String::Handle(comp->type().Name()).ToCString());
|
| }
|
|
|
| +
|
| +void FlowGraphPrinter::VisitCreateArray(CreateArrayComp* comp) {
|
| + OS::Print("CreateArray(");
|
| + for (int i = 0; i < comp->ElementCount(); ++i) {
|
| + if (i != 0) OS::Print(", ");
|
| + comp->ElementAt(i)->Accept(this);
|
| + }
|
| + OS::Print(")");
|
| +}
|
| +
|
| +
|
| void FlowGraphPrinter::VisitJoinEntry(JoinEntryInstr* instr) {
|
| OS::Print("%2d: [join]", instr->block_number());
|
| }
|
|
|