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

Unified Diff: src/compiler/osr.cc

Issue 890903002: [turbofan] Fix OSR into functions where the expression stack is not empty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
Index: src/compiler/osr.cc
diff --git a/src/compiler/osr.cc b/src/compiler/osr.cc
index a4b845249f0ed3649f5f963f2c371dc84f168c5e..b97762b1cd64df75c6e503ba9ccf20c1fe06cb54 100644
--- a/src/compiler/osr.cc
+++ b/src/compiler/osr.cc
@@ -20,7 +20,8 @@ namespace compiler {
OsrHelper::OsrHelper(CompilationInfo* info)
: parameter_count_(info->scope()->num_parameters()),
- stack_slot_count_(info->scope()->num_stack_slots()) {}
+ stack_slot_count_(info->scope()->num_stack_slots() +
+ info->osr_expr_stack_height()) {}
bool OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
@@ -75,6 +76,8 @@ void OsrHelper::SetupFrame(Frame* frame) {
// The optimized frame will subsume the unoptimized frame. Do so by reserving
// the first spill slots.
frame->ReserveSpillSlots(UnoptimizedFrameSlots());
+ // The frame needs to be adjusted by the number of unoptimized frame slots.
+ frame->SetOsrStackSlots(UnoptimizedFrameSlots());
}

Powered by Google App Engine
This is Rietveld 408576698