Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc
index 229169f..3f20daa 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -24,6 +24,11 @@
HeapConstant(isolate()->builtins()->AllocateInOldSpace()));
}
+Node* JSGraph::ToNumberBuiltinConstant() {
+ return CACHED(kToNumberBuiltinConstant,
+ HeapConstant(isolate()->builtins()->ToNumber()));
+}
+
Node* JSGraph::CEntryStubConstant(int result_size) {
if (result_size == 1) {
return CACHED(kCEntryStubConstant,
@@ -38,6 +43,11 @@
HeapConstant(factory()->empty_fixed_array()));
}
+Node* JSGraph::EmptyLiteralsArrayConstant() {
+ return CACHED(kEmptyLiteralsArrayConstant,
+ HeapConstant(factory()->empty_literals_array()));
+}
+
Node* JSGraph::HeapNumberMapConstant() {
return CACHED(kHeapNumberMapConstant,
HeapConstant(factory()->heap_number_map()));
@@ -108,15 +118,15 @@
// canonicalized node can be used.
if (value->IsNumber()) {
return Constant(value->Number());
- } else if (value->IsUndefined()) {
+ } else if (value->IsUndefined(isolate())) {
return UndefinedConstant();
- } else if (value->IsTrue()) {
+ } else if (value->IsTrue(isolate())) {
return TrueConstant();
- } else if (value->IsFalse()) {
+ } else if (value->IsFalse(isolate())) {
return FalseConstant();
- } else if (value->IsNull()) {
+ } else if (value->IsNull(isolate())) {
return NullConstant();
- } else if (value->IsTheHole()) {
+ } else if (value->IsTheHole(isolate())) {
return TheHoleConstant();
} else {
return HeapConstant(Handle<HeapObject>::cast(value));
@@ -156,7 +166,8 @@
}
Node* JSGraph::RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode) {
- Node** loc = cache_.FindRelocatableInt32Constant(value);
+ Node** loc = cache_.FindRelocatableInt32Constant(
+ value, static_cast<RelocInfoMode>(rmode));
if (*loc == nullptr) {
*loc = graph()->NewNode(common()->RelocatableInt32Constant(value, rmode));
}
@@ -164,7 +175,8 @@
}
Node* JSGraph::RelocatableInt64Constant(int64_t value, RelocInfo::Mode rmode) {
- Node** loc = cache_.FindRelocatableInt64Constant(value);
+ Node** loc = cache_.FindRelocatableInt64Constant(
+ value, static_cast<RelocInfoMode>(rmode));
if (*loc == nullptr) {
*loc = graph()->NewNode(common()->RelocatableInt64Constant(value, rmode));
}
@@ -218,22 +230,10 @@
return ExternalConstant(ExternalReference(function_id, isolate()));
}
-
-Node* JSGraph::EmptyFrameState() {
- Node* empty_frame_state = cached_nodes_[kEmptyFrameState];
- if (!empty_frame_state || empty_frame_state->IsDead()) {
- Node* state_values = graph()->NewNode(common()->StateValues(0));
- empty_frame_state = graph()->NewNode(
- common()->FrameState(BailoutId::None(),
- OutputFrameStateCombine::Ignore(), nullptr),
- state_values, state_values, state_values, NoContextConstant(),
- UndefinedConstant(), graph()->start());
- cached_nodes_[kEmptyFrameState] = empty_frame_state;
- }
- return empty_frame_state;
+Node* JSGraph::EmptyStateValues() {
+ return CACHED(kEmptyStateValues, graph()->NewNode(common()->StateValues(0)));
}
-
Node* JSGraph::Dead() {
return CACHED(kDead, graph()->NewNode(common()->Dead()));
}