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

Unified Diff: test/unittests/compiler/tail-call-optimization-unittest.cc

Issue 2446543002: [turbofan] Support variable size argument popping in TF-generated functions (Closed)
Patch Set: Fix tests and arm64 Created 4 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
« no previous file with comments | « test/unittests/compiler/scheduler-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/tail-call-optimization-unittest.cc
diff --git a/test/unittests/compiler/tail-call-optimization-unittest.cc b/test/unittests/compiler/tail-call-optimization-unittest.cc
index 56fedeeb0903af9af4bcc2f005af221aac5631c9..127f269960c528557aa1ca6fa902ac2ae5ce168e 100644
--- a/test/unittests/compiler/tail-call-optimization-unittest.cc
+++ b/test/unittests/compiler/tail-call-optimization-unittest.cc
@@ -39,7 +39,9 @@ TEST_F(TailCallOptimizationTest, CallCodeObject0) {
Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1,
graph()->start(), graph()->start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
- Node* ret = graph()->NewNode(common()->Return(), call, call, if_success);
+ Node* zero = graph()->NewNode(common()->Int32Constant(0));
+ Node* ret =
+ graph()->NewNode(common()->Return(), zero, call, call, if_success);
Reduction r = Reduce(ret);
ASSERT_FALSE(r.Changed());
}
@@ -60,7 +62,9 @@ TEST_F(TailCallOptimizationTest, CallCodeObject1) {
graph()->start(), graph()->start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
Node* if_exception = graph()->NewNode(common()->IfException(), call, call);
- Node* ret = graph()->NewNode(common()->Return(), call, call, if_success);
+ Node* zero = graph()->NewNode(common()->Int32Constant(0));
+ Node* ret =
+ graph()->NewNode(common()->Return(), zero, call, call, if_success);
Node* end = graph()->NewNode(common()->End(1), if_exception);
graph()->SetEnd(end);
Reduction r = Reduce(ret);
@@ -82,7 +86,9 @@ TEST_F(TailCallOptimizationTest, CallCodeObject2) {
Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1,
graph()->start(), graph()->start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
- Node* ret = graph()->NewNode(common()->Return(), call, call, if_success);
+ Node* zero = graph()->NewNode(common()->Int32Constant(0));
+ Node* ret =
+ graph()->NewNode(common()->Return(), zero, call, call, if_success);
Reduction r = Reduce(ret);
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsTailCall(kCallDescriptor, p0, p1,
@@ -104,7 +110,9 @@ TEST_F(TailCallOptimizationTest, CallJSFunction0) {
Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1,
graph()->start(), graph()->start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
- Node* ret = graph()->NewNode(common()->Return(), call, call, if_success);
+ Node* zero = graph()->NewNode(common()->Int32Constant(0));
+ Node* ret =
+ graph()->NewNode(common()->Return(), zero, call, call, if_success);
Reduction r = Reduce(ret);
ASSERT_FALSE(r.Changed());
}
@@ -125,7 +133,9 @@ TEST_F(TailCallOptimizationTest, CallJSFunction1) {
graph()->start(), graph()->start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
Node* if_exception = graph()->NewNode(common()->IfException(), call, call);
- Node* ret = graph()->NewNode(common()->Return(), call, call, if_success);
+ Node* zero = graph()->NewNode(common()->Int32Constant(0));
+ Node* ret =
+ graph()->NewNode(common()->Return(), zero, call, call, if_success);
Node* end = graph()->NewNode(common()->End(1), if_exception);
graph()->SetEnd(end);
Reduction r = Reduce(ret);
@@ -146,7 +156,9 @@ TEST_F(TailCallOptimizationTest, CallJSFunction2) {
Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1,
graph()->start(), graph()->start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
- Node* ret = graph()->NewNode(common()->Return(), call, call, if_success);
+ Node* zero = graph()->NewNode(common()->Int32Constant(0));
+ Node* ret =
+ graph()->NewNode(common()->Return(), zero, call, call, if_success);
Reduction r = Reduce(ret);
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsTailCall(kCallDescriptor, p0, p1,
« no previous file with comments | « test/unittests/compiler/scheduler-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698