Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: src/crankshaft/arm64/lithium-arm64.cc

Issue 1816113002: [crankshaft] Always generate lazy bailout points for tail calls ... (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-arm64.cc b/src/crankshaft/arm64/lithium-arm64.cc
index 41a9fd398e965136e0cc7666c89b72c38a085d07..e50d3ec7bec5f7bda8a9b7bb84629d8b251d023d 100644
--- a/src/crankshaft/arm64/lithium-arm64.cc
+++ b/src/crankshaft/arm64/lithium-arm64.cc
@@ -730,6 +730,11 @@ void LChunkBuilder::AddInstruction(LInstruction* instr,
// Push return value on top of outer environment.
hydrogen_env = hydrogen_env->Copy();
hydrogen_env->Push(hydrogen_val);
+ } else {
+ // Although we don't need this lazy bailout for normal execution
+ // (because when we tail call from the outermost function we should pop
+ // its frame) we still need it when debugger is on.
+ hydrogen_env = current_block_->last_environment();
}
} else {
if (hydrogen_val->HasObservableSideEffects()) {
@@ -738,16 +743,10 @@ void LChunkBuilder::AddInstruction(LInstruction* instr,
hydrogen_value_for_lazy_bailout = sim;
}
}
- if (hydrogen_env != nullptr) {
- // The |hydrogen_env| can be null at this point only if we are generating
- // a syntactic tail call from the outermost function but in this case
- // it would be a real tail call which will pop function's frame and
- // therefore this lazy bailout can be skipped.
- LInstruction* bailout = LChunkBuilderBase::AssignEnvironment(
- new (zone()) LLazyBailout(), hydrogen_env);
- bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
- chunk_->AddInstruction(bailout, current_block_);
- }
+ LInstruction* bailout = LChunkBuilderBase::AssignEnvironment(
+ new (zone()) LLazyBailout(), hydrogen_env);
+ bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
+ chunk_->AddInstruction(bailout, current_block_);
}
}
« no previous file with comments | « src/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698