summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/machine-graph.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/machine-graph.cc')
-rw-r--r--deps/v8/src/compiler/machine-graph.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/machine-graph.cc b/deps/v8/src/compiler/machine-graph.cc
index 3f05d56a9a..0a00392f4b 100644
--- a/deps/v8/src/compiler/machine-graph.cc
+++ b/deps/v8/src/compiler/machine-graph.cc
@@ -32,6 +32,15 @@ Node* MachineGraph::IntPtrConstant(intptr_t value) {
: Int64Constant(static_cast<int64_t>(value));
}
+Node* MachineGraph::TaggedIndexConstant(intptr_t value) {
+ int32_t value32 = static_cast<int32_t>(value);
+ Node** loc = cache_.FindTaggedIndexConstant(value32);
+ if (*loc == nullptr) {
+ *loc = graph()->NewNode(common()->TaggedIndexConstant(value32));
+ }
+ return *loc;
+}
+
Node* MachineGraph::RelocatableInt32Constant(int32_t value,
RelocInfo::Mode rmode) {
Node** loc = cache_.FindRelocatableInt32Constant(