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

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

Issue 2494753003: [turbofan] Introduce an ExternalPointer type. (Closed)
Patch Set: Stronger ducktape. Created 4 years, 1 month 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/js-graph.h ('k') | src/compiler/opcodes.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 cafd047e74781f9a2b5e72c4c7f4e1aed65ea5bb..8626cd1821473a58283789368de722030a8ff06d 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -242,6 +242,13 @@ Node* JSGraph::Float64Constant(double value) {
return *loc;
}
+Node* JSGraph::PointerConstant(intptr_t value) {
+ Node** loc = cache_.FindPointerConstant(value);
+ if (*loc == nullptr) {
+ *loc = graph()->NewNode(common()->PointerConstant(value));
+ }
+ return *loc;
+}
Node* JSGraph::ExternalConstant(ExternalReference reference) {
Node** loc = cache_.FindExternalConstant(reference);
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698