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

Unified Diff: src/compiler/node-cache.cc

Issue 656103002: Add JSGraph::GetCachedNodes and NodeCache::GetCachedNodes. These routines are necessary in the dead… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
Index: src/compiler/node-cache.cc
diff --git a/src/compiler/node-cache.cc b/src/compiler/node-cache.cc
index dbf61acc40fca7f0ef005947fb576503acedb84a..2049de526d23763debd5fda44062cbe8b743bb24 100644
--- a/src/compiler/node-cache.cc
+++ b/src/compiler/node-cache.cc
@@ -7,6 +7,7 @@
#include <cstring>
#include "src/zone.h"
+#include "src/zone-containers.h"
namespace v8 {
namespace internal {
@@ -90,6 +91,15 @@ 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) {
+ if (entries_) {
+ for (size_t i = 0; i < size_; i++) {
+ if (entries_[i].value_ != NULL) nodes->push_back(entries_[i].value_);
+ }
+ }
+}
+
template class NodeCache<int64_t>;
template class NodeCache<int32_t>;
template class NodeCache<void*>;

Powered by Google App Engine
This is Rietveld 408576698