Merge V8 5.4.500.40
Test: Manual - built & ran d8
Change-Id: I4edfa2853d3e565b729723645395688ece3193f4
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc
index 3f20daa..cafd047 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -29,15 +29,23 @@
HeapConstant(isolate()->builtins()->ToNumber()));
}
-Node* JSGraph::CEntryStubConstant(int result_size) {
- if (result_size == 1) {
- return CACHED(kCEntryStubConstant,
- HeapConstant(CEntryStub(isolate(), 1).GetCode()));
+Node* JSGraph::CEntryStubConstant(int result_size, SaveFPRegsMode save_doubles,
+ ArgvMode argv_mode, bool builtin_exit_frame) {
+ if (save_doubles == kDontSaveFPRegs && argv_mode == kArgvOnStack &&
+ result_size == 1) {
+ CachedNode key = builtin_exit_frame
+ ? kCEntryStubWithBuiltinExitFrameConstant
+ : kCEntryStubConstant;
+ return CACHED(key,
+ HeapConstant(CEntryStub(isolate(), result_size, save_doubles,
+ argv_mode, builtin_exit_frame)
+ .GetCode()));
}
- return HeapConstant(CEntryStub(isolate(), result_size).GetCode());
+ CEntryStub stub(isolate(), result_size, save_doubles, argv_mode,
+ builtin_exit_frame);
+ return HeapConstant(stub.GetCode());
}
-
Node* JSGraph::EmptyFixedArrayConstant() {
return CACHED(kEmptyFixedArrayConstant,
HeapConstant(factory()->empty_fixed_array()));
@@ -48,6 +56,20 @@
HeapConstant(factory()->empty_literals_array()));
}
+Node* JSGraph::EmptyStringConstant() {
+ return CACHED(kEmptyStringConstant, HeapConstant(factory()->empty_string()));
+}
+
+Node* JSGraph::FixedArrayMapConstant() {
+ return CACHED(kFixedArrayMapConstant,
+ HeapConstant(factory()->fixed_array_map()));
+}
+
+Node* JSGraph::FixedDoubleArrayMapConstant() {
+ return CACHED(kFixedDoubleArrayMapConstant,
+ HeapConstant(factory()->fixed_double_array_map()));
+}
+
Node* JSGraph::HeapNumberMapConstant() {
return CACHED(kHeapNumberMapConstant,
HeapConstant(factory()->heap_number_map()));
@@ -92,7 +114,6 @@
return CACHED(kZeroConstant, NumberConstant(0.0));
}
-
Node* JSGraph::OneConstant() {
return CACHED(kOneConstant, NumberConstant(1.0));
}
@@ -147,6 +168,11 @@
return NumberConstant(value);
}
+Node* JSGraph::Constant(uint32_t value) {
+ if (value == 0) return ZeroConstant();
+ if (value == 1) return OneConstant();
+ return NumberConstant(value);
+}
Node* JSGraph::Int32Constant(int32_t value) {
Node** loc = cache_.FindInt32Constant(value);