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

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

Issue 1523323005: [turbofan] Implement proper caching of heap constants in the JSGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/common-node-cache.h ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-node-cache.cc
diff --git a/src/compiler/common-node-cache.cc b/src/compiler/common-node-cache.cc
index e7f7436a0bd76624ce182e3dc4797b31b361c88a..a0ae6e8ad74e3df87e18b06cc3e74b7f0de3faee 100644
--- a/src/compiler/common-node-cache.cc
+++ b/src/compiler/common-node-cache.cc
@@ -16,6 +16,11 @@ Node** CommonNodeCache::FindExternalConstant(ExternalReference value) {
}
+Node** CommonNodeCache::FindHeapConstant(Handle<HeapObject> value) {
+ return heap_constants_.Find(zone(), bit_cast<intptr_t>(value.location()));
+}
+
+
void CommonNodeCache::GetCachedNodes(ZoneVector<Node*>* nodes) {
int32_constants_.GetCachedNodes(nodes);
int64_constants_.GetCachedNodes(nodes);
@@ -23,6 +28,7 @@ void CommonNodeCache::GetCachedNodes(ZoneVector<Node*>* nodes) {
float64_constants_.GetCachedNodes(nodes);
external_constants_.GetCachedNodes(nodes);
number_constants_.GetCachedNodes(nodes);
+ heap_constants_.GetCachedNodes(nodes);
}
} // namespace compiler
« no previous file with comments | « src/compiler/common-node-cache.h ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698