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

Unified Diff: src/compiler/js-graph.cc

Issue 539503002: [turbofan] Initial version of ValueNumberingReducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit and clang-format. Created 6 years, 3 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
« no previous file with comments | « src/compiler/compiler.gyp ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-graph.cc
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc
index b229306d2b99333f38bd8597cbd8ef020cf1ac25..4327b48558bbbaebc8943cf1e964abeddbc51f64 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -104,8 +104,14 @@ Node* JSGraph::HeapConstant(Handle<Object> value) {
// TODO(titzer): We could also match against the addresses of immortable
// immovables here, even without access to the heap, thus always
// canonicalizing references to them.
- return HeapConstant(
- PrintableUnique<Object>::CreateUninitialized(zone(), value));
+ // return HeapConstant(
+ // PrintableUnique<Object>::CreateUninitialized(zone(), value));
+ // TODO(turbofan): This is a work-around to make Unique::HashCode() work for
+ // value numbering. We need some sane way to compute a unique hash code for
+ // arbitrary handles here.
+ PrintableUnique<Object> unique(
+ zone(), reinterpret_cast<Address>(*value.location()), value);
+ return HeapConstant(unique);
}
« no previous file with comments | « src/compiler/compiler.gyp ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698