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

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

Issue 1849503002: [crankshaft] [turbofan] Fix environment handling when generating a tail call from inlined function. (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/x64/lithium-x64.cc ('k') | test/mjsunit/regress/regress-crbug-598998.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-x87.cc
diff --git a/src/crankshaft/x87/lithium-x87.cc b/src/crankshaft/x87/lithium-x87.cc
index 635916dc53396021ab0116dff9dc3dc63933a953..51d9cd697b1a716a8e37996111f0daeb0de93faf 100644
--- a/src/crankshaft/x87/lithium-x87.cc
+++ b/src/crankshaft/x87/lithium-x87.cc
@@ -925,10 +925,12 @@ void LChunkBuilder::AddInstruction(LInstruction* instr,
DCHECK_NOT_NULL(hydrogen_env);
if (instr->IsSyntacticTailCall()) {
// If it was a syntactic tail call we need to drop the current frame and
- // an arguments adaptor frame on top of it (if the latter is present).
+ // all the frames on top of it that are either an arguments adaptor frame
+ // or a tail caller frame.
hydrogen_env = hydrogen_env->outer();
- if (hydrogen_env != nullptr &&
- hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) {
+ while (hydrogen_env != nullptr &&
+ (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR ||
+ hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) {
hydrogen_env = hydrogen_env->outer();
}
if (hydrogen_env != nullptr) {
« no previous file with comments | « src/crankshaft/x64/lithium-x64.cc ('k') | test/mjsunit/regress/regress-crbug-598998.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698