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

Unified Diff: src/compiler/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.h ('k') | test/cctest/compiler/test-node-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node-cache.cc
diff --git a/src/compiler/node-cache.cc b/src/compiler/node-cache.cc
index 35d03cec9b4234ce8b341f90d0ce48c8dd431276..92a3fa078f38abf78a1f4c0b875dcae7ca406b4c 100644
--- a/src/compiler/node-cache.cc
+++ b/src/compiler/node-cache.cc
@@ -13,6 +13,13 @@ namespace v8 {
namespace internal {
namespace compiler {
+namespace {
+
+enum { kInitialSize = 16u, kLinearProbe = 5u };
+
+} // namespace
+
+
template <typename Key, typename Hash, typename Pred>
struct NodeCache<Key, Hash, Pred>::Entry {
Key key_;
@@ -92,17 +99,21 @@ Node** NodeCache<Key, Hash, Pred>::Find(Zone* zone, Key key) {
template <typename Key, typename Hash, typename Pred>
-void NodeCache<Key, Hash, Pred>::GetCachedNodes(NodeVector* nodes) {
+void NodeCache<Key, Hash, Pred>::GetCachedNodes(ZoneVector<Node*>* nodes) {
if (entries_) {
for (size_t i = 0; i < size_ + kLinearProbe; i++) {
- if (entries_[i].value_ != NULL) nodes->push_back(entries_[i].value_);
+ if (entries_[i].value_) nodes->push_back(entries_[i].value_);
}
}
}
-template class NodeCache<int64_t>;
+
+// -----------------------------------------------------------------------------
+// Instantiations
+
+
template class NodeCache<int32_t>;
-template class NodeCache<void*>;
+template class NodeCache<int64_t>;
} // namespace compiler
} // namespace internal
« no previous file with comments | « src/compiler/node-cache.h ('k') | test/cctest/compiler/test-node-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698