Upgrade V8 to 5.1.281.57  DO NOT MERGE

FPIIM-449

Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/test/cctest/compiler/test-run-native-calls.cc b/test/cctest/compiler/test-run-native-calls.cc
index 8911409..bfdcc0e 100644
--- a/test/cctest/compiler/test-run-native-calls.cc
+++ b/test/cctest/compiler/test-run-native-calls.cc
@@ -270,7 +270,7 @@
 
 
 Handle<Code> WrapWithCFunction(Handle<Code> inner, CallDescriptor* desc) {
-  Zone zone;
+  Zone zone(inner->GetIsolate()->allocator());
   MachineSignature* msig =
       const_cast<MachineSignature*>(desc->GetMachineSignature());
   int param_count = static_cast<int>(msig->parameter_count());
@@ -437,7 +437,7 @@
     Handle<Code> inner = Handle<Code>::null();
     {
       // Build the graph for the computation.
-      Zone zone;
+      Zone zone(isolate->allocator());
       Graph graph(&zone);
       RawMachineAssembler raw(isolate, &graph, desc);
       build(desc, raw);
@@ -452,7 +452,7 @@
       Handle<Code> wrapper = Handle<Code>::null();
       {
         // Wrap the above code with a callable function that passes constants.
-        Zone zone;
+        Zone zone(isolate->allocator());
         Graph graph(&zone);
         CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
         RawMachineAssembler raw(isolate, &graph, cdesc);
@@ -484,7 +484,7 @@
       Handle<Code> wrapper = Handle<Code>::null();
       {
         // Wrap the above code with a callable function that loads from {input}.
-        Zone zone;
+        Zone zone(isolate->allocator());
         Graph graph(&zone);
         CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
         RawMachineAssembler raw(isolate, &graph, cdesc);
@@ -522,7 +522,7 @@
 static void TestInt32Sub(CallDescriptor* desc) {
   Isolate* isolate = CcTest::InitIsolateOnce();
   HandleScope scope(isolate);
-  Zone zone;
+  Zone zone(isolate->allocator());
   GraphAndBuilders inner(&zone);
   {
     // Build the add function.
@@ -563,7 +563,7 @@
   Handle<Code> inner = Handle<Code>::null();
   {
     // Writes all parameters into the output buffer.
-    Zone zone;
+    Zone zone(isolate->allocator());
     Graph graph(&zone);
     RawMachineAssembler raw(isolate, &graph, desc);
     Node* base = raw.PointerConstant(output);
@@ -580,7 +580,7 @@
   Handle<Code> wrapper = Handle<Code>::null();
   {
     // Loads parameters from the input buffer and calls the above code.
-    Zone zone;
+    Zone zone(isolate->allocator());
     Graph graph(&zone);
     CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
     RawMachineAssembler raw(isolate, &graph, cdesc);
@@ -619,7 +619,8 @@
 
 static void Test_RunInt32SubWithRet(int retreg) {
   Int32Signature sig(2);
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   RegisterPairs pairs;
   while (pairs.More()) {
     int parray[2];
@@ -670,7 +671,8 @@
   Int32Signature sig(2);
   RegisterPairs pairs;
   while (pairs.More()) {
-    Zone zone;
+    base::AccountingAllocator allocator;
+    Zone zone(&allocator);
     int parray[1];
     int rarray[1];
     pairs.Next(&rarray[0], &parray[0], true);
@@ -687,7 +689,8 @@
   Int32Signature sig(20);
   RegisterPairs pairs;
   while (pairs.More()) {
-    Zone zone;
+    base::AccountingAllocator allocator;
+    Zone zone(&allocator);
     int parray[2];
     int rarray[] = {
         RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN)
@@ -739,7 +742,8 @@
   Int32Signature sig(count);
   for (int p0 = 0; p0 < Register::kNumRegisters; p0++) {
     if (Register::from_code(p0).IsAllocatable()) {
-      Zone zone;
+      base::AccountingAllocator allocator;
+      Zone zone(&allocator);
 
       int parray[] = {p0};
       int rarray[] = {
@@ -807,7 +811,8 @@
   Allocator rets(rarray, 1, nullptr, 0);
   RegisterConfig config(params, rets);
 
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
 
   for (int i = which + 1; i <= 64; i++) {
     Int32Signature sig(i);
@@ -849,7 +854,8 @@
   ArgsBuffer<int64_t>::Sig sig(2);
 
   RegisterPairs pairs;
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   while (pairs.More()) {
     int parray[2];
     pairs.Next(&parray[0], &parray[1], false);
@@ -876,7 +882,8 @@
   ArgsBuffer<float32>::Sig sig(2);
 
   Float32RegisterPairs pairs;
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   while (pairs.More()) {
     int parray[2];
     pairs.Next(&parray[0], &parray[1], false);
@@ -904,7 +911,8 @@
   ArgsBuffer<float64>::Sig sig(2);
 
   Float64RegisterPairs pairs;
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   while (pairs.More()) {
     int parray[2];
     pairs.Next(&parray[0], &parray[1], false);
@@ -927,7 +935,8 @@
   Allocator rets(nullptr, 0, rarray, 1);
   RegisterConfig config(params, rets);
 
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   for (int count = 1; count < 6; count++) {
     ArgsBuffer<float32>::Sig sig(count);
     CallDescriptor* desc = config.Create(&zone, &sig);
@@ -949,7 +958,8 @@
   Allocator rets(nullptr, 0, rarray, 1);
   RegisterConfig config(params, rets);
 
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   for (int count = 1; count < 6; count++) {
     ArgsBuffer<float64>::Sig sig(count);
     CallDescriptor* desc = config.Create(&zone, &sig);
@@ -972,7 +982,7 @@
   {
     Isolate* isolate = CcTest::InitIsolateOnce();
     // Build the actual select.
-    Zone zone;
+    Zone zone(isolate->allocator());
     Graph graph(&zone);
     RawMachineAssembler raw(isolate, &graph, desc);
     raw.Return(raw.Parameter(which));
@@ -1002,7 +1012,8 @@
   Allocator params(nullptr, 0, nullptr, 0);
   Allocator rets(nullptr, 0, rarray, 1);
 
-  Zone zone;
+  base::AccountingAllocator allocator;
+  Zone zone(&allocator);
   ArgsBuffer<float64>::Sig sig(2);
   RegisterConfig config(params, rets);
   CallDescriptor* desc = config.Create(&zone, &sig);
@@ -1068,7 +1079,8 @@
   RegisterConfig config(palloc, ralloc);
 
   for (int which = 0; which < num_params; which++) {
-    Zone zone;
+    base::AccountingAllocator allocator;
+    Zone zone(&allocator);
     HandleScope scope(isolate);
     MachineSignature::Builder builder(&zone, 1, num_params);
     builder.AddReturn(params[which]);
@@ -1079,7 +1091,7 @@
     Handle<Code> select;
     {
       // build the select.
-      Zone zone;
+      Zone zone(&allocator);
       Graph graph(&zone);
       RawMachineAssembler raw(isolate, &graph, desc);
       raw.Return(raw.Parameter(which));
@@ -1096,7 +1108,7 @@
       CSignature0<int32_t> csig;
       {
         // Wrap the select code with a callable function that passes constants.
-        Zone zone;
+        Zone zone(&allocator);
         Graph graph(&zone);
         CallDescriptor* cdesc = Linkage::GetSimplifiedCDescriptor(&zone, &csig);
         RawMachineAssembler raw(isolate, &graph, cdesc);
@@ -1189,7 +1201,7 @@
   Allocator ralloc(rarray_gp, 1, rarray_fp, 1);
   RegisterConfig config(palloc, ralloc);
 
-  Zone zone;
+  Zone zone(isolate->allocator());
   HandleScope scope(isolate);
   MachineSignature::Builder builder(&zone, 1, 12);
   builder.AddReturn(MachineType::Int32());