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

Unified Diff: test/cctest/compiler/test-node-cache.cc

Issue 822923002: [turbofan] Cache float32 constants on the JSGraph level. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/node-cache.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-node-cache.cc
diff --git a/test/cctest/compiler/test-node-cache.cc b/test/cctest/compiler/test-node-cache.cc
index 57bf7faa9f10eb30b8f929c5a3e088e655c3e1cb..a48adb9acc32f781bfd667dbb2a357dd8bcadf62 100644
--- a/test/cctest/compiler/test-node-cache.cc
+++ b/test/cctest/compiler/test-node-cache.cc
@@ -115,51 +115,6 @@ TEST(Int64Constant_hits) {
}
-TEST(PtrConstant_back_to_back) {
- GraphTester graph;
- PtrNodeCache cache;
- int32_t buffer[50];
-
- for (int32_t* p = buffer;
- (p - buffer) < static_cast<ptrdiff_t>(arraysize(buffer)); p++) {
- Node** pos = cache.Find(graph.zone(), p);
- CHECK_NE(NULL, pos);
- for (int j = 0; j < 3; j++) {
- Node** npos = cache.Find(graph.zone(), p);
- CHECK_EQ(pos, npos);
- }
- }
-}
-
-
-TEST(PtrConstant_hits) {
- GraphTester graph;
- PtrNodeCache cache;
- const int32_t kSize = 50;
- int32_t buffer[kSize];
- Node* nodes[kSize];
- CommonOperatorBuilder common(graph.zone());
-
- for (size_t i = 0; i < arraysize(buffer); i++) {
- int k = static_cast<int>(i);
- int32_t* p = &buffer[i];
- nodes[i] = graph.NewNode(common.Int32Constant(k));
- *cache.Find(graph.zone(), p) = nodes[i];
- }
-
- int hits = 0;
- for (size_t i = 0; i < arraysize(buffer); i++) {
- int32_t* p = &buffer[i];
- Node** pos = cache.Find(graph.zone(), p);
- if (*pos != NULL) {
- CHECK_EQ(nodes[i], *pos);
- hits++;
- }
- }
- CHECK_LT(4, hits);
-}
-
-
static bool Contains(NodeVector* nodes, Node* n) {
for (size_t i = 0; i < nodes->size(); i++) {
if (nodes->at(i) == n) return true;
« no previous file with comments | « src/compiler/node-cache.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698