Index: test/unittests/compiler/linkage-tail-call-unittest.cc |
diff --git a/test/unittests/compiler/linkage-tail-call-unittest.cc b/test/unittests/compiler/linkage-tail-call-unittest.cc |
index 5d24a3bd1da6963f2a5984eac10899205e9e6ca7..814f5efb8e684cd68a25b7a2ef6afa7fae19bb6e 100644 |
--- a/test/unittests/compiler/linkage-tail-call-unittest.cc |
+++ b/test/unittests/compiler/linkage-tail-call-unittest.cc |
@@ -55,7 +55,9 @@ TEST_F(LinkageTailCall, EmptyToEmpty) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_TRUE(desc->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -71,7 +73,9 @@ TEST_F(LinkageTailCall, SameReturn) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc2); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_TRUE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -89,7 +93,9 @@ TEST_F(LinkageTailCall, DifferingReturn) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc2); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_FALSE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_FALSE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -108,7 +114,9 @@ TEST_F(LinkageTailCall, MoreRegisterParametersCallee) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc2); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_TRUE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -127,7 +135,9 @@ TEST_F(LinkageTailCall, MoreRegisterParametersCaller) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc2); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_TRUE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -146,7 +156,9 @@ TEST_F(LinkageTailCall, MoreRegisterAndStackParametersCallee) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc2); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_FALSE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_FALSE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(1, stack_param_delta); |
} |
@@ -165,7 +177,9 @@ TEST_F(LinkageTailCall, MoreRegisterAndStackParametersCaller) { |
CommonOperatorBuilder common(zone()); |
const Operator* op = common.Call(desc2); |
Node* const node = Node::New(zone(), 1, op, 0, nullptr, false); |
- EXPECT_FALSE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(-1, stack_param_delta); |
} |
@@ -189,7 +203,9 @@ TEST_F(LinkageTailCall, MatchingStackParameters) { |
const Operator* op = common.Call(desc2); |
Node* const node = |
Node::New(zone(), 1, op, arraysize(parameters), parameters, false); |
- EXPECT_TRUE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -213,7 +229,9 @@ TEST_F(LinkageTailCall, NonMatchingStackParameters) { |
const Operator* op = common.Call(desc2); |
Node* const node = |
Node::New(zone(), 1, op, arraysize(parameters), parameters, false); |
- EXPECT_FALSE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -238,7 +256,9 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCallerRegisters) { |
const Operator* op = common.Call(desc2); |
Node* const node = |
Node::New(zone(), 1, op, arraysize(parameters), parameters, false); |
- EXPECT_TRUE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -264,7 +284,9 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCalleeRegisters) { |
const Operator* op = common.Call(desc2); |
Node* const node = |
Node::New(zone(), 1, op, arraysize(parameters), parameters, false); |
- EXPECT_TRUE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(0, stack_param_delta); |
} |
@@ -290,7 +312,9 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCallerRegistersAndStack) { |
const Operator* op = common.Call(desc2); |
Node* const node = |
Node::New(zone(), 1, op, arraysize(parameters), parameters, false); |
- EXPECT_FALSE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_TRUE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(-1, stack_param_delta); |
} |
@@ -316,7 +340,9 @@ TEST_F(LinkageTailCall, MatchingStackParametersExtraCalleeRegistersAndStack) { |
const Operator* op = common.Call(desc2); |
Node* const node = |
Node::New(zone(), 1, op, arraysize(parameters), parameters, false); |
- EXPECT_FALSE(desc1->CanTailCall(node)); |
+ int stack_param_delta = 0; |
+ EXPECT_FALSE(desc1->CanTailCall(node, &stack_param_delta)); |
+ EXPECT_EQ(1, stack_param_delta); |
} |
} // namespace compiler |