| Index: src/arm64/lithium-arm64.cc
|
| diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
|
| index d18808a587b1cd2a50dc9a58120786de46a978ea..3d3f724fe23ce8c73f9b1102dd29de5432c85282 100644
|
| --- a/src/arm64/lithium-arm64.cc
|
| +++ b/src/arm64/lithium-arm64.cc
|
| @@ -678,10 +678,18 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| argument_count_ += current->argument_delta();
|
| ASSERT(argument_count_ >= 0);
|
|
|
| + CheckAndAddInstruction(instr, current);
|
| +
|
| + current_instruction_ = old_current;
|
| +}
|
| +
|
| +
|
| +void LChunkBuilder::CheckAndAddInstruction(LInstruction* instr,
|
| + HInstruction* hydrogen_val) {
|
| if (instr != NULL) {
|
| // Associate the hydrogen instruction first, since we may need it for
|
| // the ClobbersRegisters() or ClobbersDoubleRegisters() calls below.
|
| - instr->set_hydrogen_value(current);
|
| + instr->set_hydrogen_value(hydrogen_val);
|
|
|
| #if DEBUG
|
| // Make sure that the lithium instruction has either no fixed register
|
| @@ -722,10 +730,10 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| chunk_->AddInstruction(instr, current_block_);
|
|
|
| if (instr->IsCall()) {
|
| - HValue* hydrogen_value_for_lazy_bailout = current;
|
| + HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
|
| LInstruction* instruction_needing_environment = NULL;
|
| - if (current->HasObservableSideEffects()) {
|
| - HSimulate* sim = HSimulate::cast(current->next());
|
| + if (hydrogen_val->HasObservableSideEffects()) {
|
| + HSimulate* sim = HSimulate::cast(hydrogen_val->next());
|
| instruction_needing_environment = instr;
|
| sim->ReplayEnvironment(current_block_->last_environment());
|
| hydrogen_value_for_lazy_bailout = sim;
|
| @@ -741,7 +749,6 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| }
|
| }
|
| }
|
| - current_instruction_ = old_current;
|
| }
|
|
|
|
|
|
|