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

Unified Diff: src/compiler/linkage-impl.h

Issue 1213043005: [turbofan] Use OSR value for innermost context value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/compiler/linkage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage-impl.h
diff --git a/src/compiler/linkage-impl.h b/src/compiler/linkage-impl.h
index d79c2c56f5695138d126be20453d40dc385b7a74..27b0235b9701e343512072d9b968d1154b11cf46 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -277,7 +277,12 @@ LinkageLocation Linkage::GetOsrValueLocation(int index) const {
int parameter_count = static_cast<int>(incoming_->JSParameterCount() - 1);
int first_stack_slot = OsrHelper::FirstStackSlotIndex(parameter_count);
- if (index >= first_stack_slot) {
+ if (index == kOsrContextSpillSlotIndex) {
+ // Context. Use the parameter location of the context spill slot.
+ // Parameter (arity + 1) is special for the context of the function frame.
+ int context_index = 1 + 1 + parameter_count; // target + receiver + params
+ return incoming_->GetInputLocation(context_index);
+ } else if (index >= first_stack_slot) {
// Local variable stored in this (callee) stack.
int spill_index =
LinkageLocation::ANY_REGISTER + 1 + index - first_stack_slot;
« no previous file with comments | « src/compiler/linkage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698