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

Unified Diff: src/compiler/linkage.cc

Issue 1426943010: [turbofan] Spill rsi and rdi in their existing locations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index c3f6074fa635453b5945947e60246793f981fb26..5ff8551def814efaac923c3005eca7402b493486 100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -565,6 +565,29 @@ LinkageLocation Linkage::GetOsrValueLocation(int index) const {
return incoming_->GetInputLocation(parameter_index);
}
}
+
+
+bool Linkage::ParameterHasSecondaryLocation(int index) const {
+ if (incoming_->kind() != CallDescriptor::kCallJSFunction) return false;
+ LinkageLocation loc = GetParameterLocation(index);
+ return (loc == regloc(kJSFunctionRegister) ||
+ loc == regloc(kContextRegister));
+ // return false;
Jarin 2015/11/12 12:08:33 Remove comment.
+}
+
+LinkageLocation Linkage::GetParameterSecondaryLocation(int index) const {
+ DCHECK(ParameterHasSecondaryLocation(index));
+ LinkageLocation loc = GetParameterLocation(index);
+
+ if (loc == regloc(kJSFunctionRegister)) {
+ return LinkageLocation::ForCalleeFrameSlot(Frame::kJSFunctionSlot);
+ } else {
+ DCHECK(loc == regloc(kContextRegister));
+ return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot);
+ }
+}
+
+
} // namespace compiler
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698