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

Unified Diff: test/unittests/compiler/node-unittest.cc

Issue 1150923003: [turbofan] Rework Node guts to save space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Avoid quadratic verification explosion. Created 5 years, 7 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 | « test/cctest/compiler/test-control-reducer.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/node-unittest.cc
diff --git a/test/unittests/compiler/node-unittest.cc b/test/unittests/compiler/node-unittest.cc
index ca5892b4ca77982ab638ade25fdf7537131ab333..217ae6115c4b6c9f81ed3e006847b7ce010b1316 100644
--- a/test/unittests/compiler/node-unittest.cc
+++ b/test/unittests/compiler/node-unittest.cc
@@ -233,6 +233,29 @@ TEST_F(NodeTest, TrimThenAppend) {
EXPECT_THAT(node->inputs(), ElementsAre(n1, n3, n4, n5, n8, n9));
}
+
+TEST_F(NodeTest, BigNodes) {
+ static const int kMaxSize = 512;
+ Node* inputs[kMaxSize];
+
+ Node* n0 = Node::New(zone(), 0, &kOp0, 0, nullptr, false);
+ Node* n1 = Node::New(zone(), 1, &kOp1, 1, &n0, false);
+
+ for (int i = 0; i < kMaxSize; i++) {
+ inputs[i] = i & 1 ? n0 : n1;
+ }
+
+ for (int size = 13; size <= kMaxSize; size += 9) {
+ Node* node = Node::New(zone(), 12345, &kOp0, size, inputs, false);
+ EXPECT_EQ(size, node->InputCount());
+
+ for (int i = 0; i < size; i++) {
+ EXPECT_EQ(inputs[i], node->InputAt(i));
+ }
+ }
+}
+
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/compiler/test-control-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698