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

Unified Diff: src/compiler/linkage.cc

Issue 1262343002: [turbofan]: Add better encapsulation to LinkageLocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Really fix it this time Created 5 years, 5 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') | src/compiler/linkage-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index b2e1aec1df553f7f6e504948f7950012d66c45b1..c604909b8a3489010dae544b9cb8c4b71a0b28ee 100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -56,17 +56,17 @@ bool CallDescriptor::CanTailCall(const Node* node) const {
// Determine the number of stack parameters passed in
size_t stack_params = 0;
for (size_t i = 0; i < InputCount(); ++i) {
- if (!GetInputLocation(i).is_register()) {
+ if (!GetInputLocation(i).IsRegister()) {
++stack_params;
}
}
// Ensure the input linkage contains the stack parameters in the right order
size_t current_stack_param = 0;
for (size_t i = 0; i < InputCount(); ++i) {
- if (!GetInputLocation(i).is_register()) {
- if (GetInputLocation(i) !=
- LinkageLocation(static_cast<int>(current_stack_param) -
- static_cast<int>(stack_params))) {
+ if (!GetInputLocation(i).IsRegister()) {
+ if (GetInputLocation(i) != LinkageLocation::ForCallerFrameSlot(
+ static_cast<int>(current_stack_param) -
+ static_cast<int>(stack_params))) {
return false;
}
++current_stack_param;
@@ -82,7 +82,7 @@ bool CallDescriptor::CanTailCall(const Node* node) const {
while (true) {
if (other_input >= other->InputCount()) {
while (current_input < InputCount()) {
- if (!GetInputLocation(current_input).is_register()) {
+ if (!GetInputLocation(current_input).IsRegister()) {
return false;
}
++current_input;
@@ -91,18 +91,18 @@ bool CallDescriptor::CanTailCall(const Node* node) const {
}
if (current_input >= InputCount()) {
while (other_input < other->InputCount()) {
- if (!other->GetInputLocation(other_input).is_register()) {
+ if (!other->GetInputLocation(other_input).IsRegister()) {
return false;
}
++other_input;
}
return true;
}
- if (GetInputLocation(current_input).is_register()) {
+ if (GetInputLocation(current_input).IsRegister()) {
++current_input;
continue;
}
- if (other->GetInputLocation(other_input).is_register()) {
+ if (other->GetInputLocation(other_input).IsRegister()) {
++other_input;
continue;
}
@@ -238,10 +238,10 @@ int Linkage::FrameStateInputCount(Runtime::FunctionId function) {
bool CallDescriptor::UsesOnlyRegisters() const {
for (size_t i = 0; i < InputCount(); ++i) {
- if (!GetInputLocation(i).is_register()) return false;
+ if (!GetInputLocation(i).IsRegister()) return false;
}
for (size_t i = 0; i < ReturnCount(); ++i) {
- if (!GetReturnLocation(i).is_register()) return false;
+ if (!GetReturnLocation(i).IsRegister()) return false;
}
return true;
}
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/linkage-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698