diff options
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/nodes.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index ada3487963..53ee711920 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -969,7 +969,14 @@ void HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { int parameter_index = 0; for (HInstructionIterator it(entry_block_->GetInstructions()); !it.Done(); it.Advance()) { HInstruction* current = it.Current(); - if (current->IsConstant()) { + if (current->IsNullConstant()) { + current->ReplaceWith(outer_graph->GetNullConstant()); + } else if (current->IsIntConstant()) { + current->ReplaceWith(outer_graph->GetIntConstant(current->AsIntConstant()->GetValue())); + } else if (current->IsLongConstant()) { + current->ReplaceWith(outer_graph->GetLongConstant(current->AsLongConstant()->GetValue())); + } else if (current->IsFloatConstant() || current->IsDoubleConstant()) { + // TODO: Don't duplicate floating-point constants. current->MoveBefore(outer_graph->GetEntryBlock()->GetLastInstruction()); } else if (current->IsParameterValue()) { current->ReplaceWith(invoke->InputAt(parameter_index++)); |