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.h

Issue 466673004: Use CommonNodeCache for heap constants in ChangeLowering. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Build fix Created 6 years, 4 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/change-lowering.cc ('k') | src/compiler/node-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-node-cache.h
diff --git a/src/compiler/common-node-cache.h b/src/compiler/common-node-cache.h
index 2b0ac0b6e2bf9e218dc421efcdca83c234891319..f9a832bc8cbe2ead944e5bf2aff721279d987b97 100644
--- a/src/compiler/common-node-cache.h
+++ b/src/compiler/common-node-cache.h
@@ -7,6 +7,7 @@
#include "src/assembler.h"
#include "src/compiler/node-cache.h"
+#include "src/unique.h"
namespace v8 {
namespace internal {
@@ -27,7 +28,8 @@ class CommonNodeCache V8_FINAL : public ZoneObject {
}
Node** FindExternalConstant(ExternalReference reference) {
- return external_constants_.Find(zone_, reference.address());
+ return external_constants_.Find(
+ zone_, reinterpret_cast<intptr_t>(reference.address()));
}
Node** FindNumberConstant(double value) {
@@ -35,17 +37,23 @@ class CommonNodeCache V8_FINAL : public ZoneObject {
return number_constants_.Find(zone_, BitCast<int64_t>(value));
}
- Zone* zone() const { return zone_; }
+ Node** FindHeapConstant(PrintableUnique<HeapObject> object) {
+ return heap_constants_.Find(zone_, object.Hashcode());
+ }
private:
Int32NodeCache int32_constants_;
Int64NodeCache float64_constants_;
- PtrNodeCache external_constants_;
+ IntPtrNodeCache external_constants_;
Int64NodeCache number_constants_;
+ IntPtrNodeCache heap_constants_;
Zone* zone_;
+
+ DISALLOW_COPY_AND_ASSIGN(CommonNodeCache);
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_COMMON_NODE_CACHE_H_
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/node-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698