Chromium Code Reviews| Index: runtime/vm/flow_graph_builder.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_builder.cc (revision 27045) |
| +++ runtime/vm/flow_graph_builder.cc (working copy) |
| @@ -686,7 +686,7 @@ |
| void TestGraphVisitor::MergeBranchWithComparison(ComparisonInstr* comp) { |
| - ControlInstruction* branch; |
| + BranchInstr* branch; |
| if (Token::IsStrictEqualityOperator(comp->kind())) { |
| branch = new BranchInstr(new StrictCompareInstr(comp->token_pos(), |
| comp->kind(), |
| @@ -1420,17 +1420,31 @@ |
| return; |
| } |
| + ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| + new ZoneGrowableArray<PushArgumentInstr*>(2); |
| + |
| ValueGraphVisitor for_left_value(owner(), temp_index()); |
| node->left()->Visit(&for_left_value); |
| Append(for_left_value); |
| + PushArgumentInstr* push_left = PushArgument(for_left_value.value()); |
| + arguments->Add(push_left); |
| + |
| ValueGraphVisitor for_right_value(owner(), temp_index()); |
| node->right()->Visit(&for_right_value); |
| Append(for_right_value); |
| - RelationalOpInstr* comp = new RelationalOpInstr(node->token_pos(), |
| - node->kind(), |
| - for_left_value.value(), |
| - for_right_value.value(), |
| - owner()->ic_data_array()); |
| + PushArgumentInstr* push_right = PushArgument(for_right_value.value()); |
| + arguments->Add(push_right); |
| + |
| + ASSERT(Token::IsRelationalOperator(node->kind())); |
| + InstanceCallInstr* comp = |
| + new InstanceCallInstr(node->token_pos(), |
| + String::ZoneHandle( |
| + Symbols::New(Token::Str(node->kind()))), |
|
Kevin Millikin (Google)
2013/09/03 13:23:55
node->Name() is the same as Token::Str(node->kind(
Florian Schneider
2013/09/03 13:55:06
Done.
|
| + node->kind(), |
| + arguments, |
| + Object::null_array(), |
| + 2, |
| + owner()->ic_data_array()); |
| ReturnDefinition(comp); |
| } |