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

Unified Diff: src/compiler/js-graph.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/js-graph.cc
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc
index fef6a074f0e4e7c65f904c844d1521c581f0bc1e..70b7d25b3a7140bc24f45da1a981d12f58c2226c 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -198,6 +198,18 @@ Node* JSGraph::ExternalConstant(ExternalReference reference) {
return *loc;
}
+
+void JSGraph::GetCachedNodes(NodeVector* nodes) {
+ cache_.GetCachedNodes(nodes);
+ SetOncePointer<Node>* ptrs[] = {
+ &c_entry_stub_constant_, &undefined_constant_, &the_hole_constant_,
+ &true_constant_, &false_constant_, &null_constant_,
+ &zero_constant_, &one_constant_, &nan_constant_};
+ for (size_t i = 0; i < arraysize(ptrs); i++) {
+ if (ptrs[i]->is_set()) nodes->push_back(ptrs[i]->get());
+ }
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/node-cache.h » ('j') | src/compiler/node-cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698