Upgrade V8 to version 4.9.385.28

https://chromium.googlesource.com/v8/v8/+/4.9.385.28

FPIIM-449

Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/src/compiler/graph-replay.cc b/src/compiler/graph-replay.cc
index 3a0b783..7f4cc95 100644
--- a/src/compiler/graph-replay.cc
+++ b/src/compiler/graph-replay.cc
@@ -4,9 +4,9 @@
 
 #include "src/compiler/graph-replay.h"
 
+#include "src/compiler/all-nodes.h"
 #include "src/compiler/common-operator.h"
 #include "src/compiler/graph.h"
-#include "src/compiler/graph-inl.h"
 #include "src/compiler/node.h"
 #include "src/compiler/operator.h"
 #include "src/compiler/operator-properties.h"
@@ -19,46 +19,51 @@
 
 void GraphReplayPrinter::PrintReplay(Graph* graph) {
   GraphReplayPrinter replay;
-  PrintF("  Node* nil = graph.NewNode(common_builder.Dead());\n");
-  graph->VisitNodeInputsFromEnd(&replay);
-}
+  PrintF("  Node* nil = graph()->NewNode(common()->Dead());\n");
+  Zone zone;
+  AllNodes nodes(&zone, graph);
 
-
-void GraphReplayPrinter::Pre(Node* node) {
-  PrintReplayOpCreator(node->op());
-  PrintF("  Node* n%d = graph.NewNode(op", node->id());
-  for (int i = 0; i < node->InputCount(); ++i) {
-    PrintF(", nil");
+  // Allocate the nodes first.
+  for (Node* node : nodes.live) {
+    PrintReplayOpCreator(node->op());
+    PrintF("  Node* n%d = graph()->NewNode(op", node->id());
+    for (int i = 0; i < node->InputCount(); ++i) {
+      PrintF(", nil");
+    }
+    PrintF("); USE(n%d);\n", node->id());
   }
-  PrintF("); USE(n%d);\n", node->id());
-}
 
-
-void GraphReplayPrinter::PostEdge(Node* from, int index, Node* to) {
-  PrintF("  n%d->ReplaceInput(%d, n%d);\n", from->id(), index, to->id());
+  // Connect the nodes to their inputs.
+  for (Node* node : nodes.live) {
+    for (int i = 0; i < node->InputCount(); i++) {
+      PrintF("  n%d->ReplaceInput(%d, n%d);\n", node->id(), i,
+             node->InputAt(i)->id());
+    }
+  }
 }
 
 
 void GraphReplayPrinter::PrintReplayOpCreator(const Operator* op) {
   IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode());
-  const char* builder =
-      IrOpcode::IsCommonOpcode(opcode) ? "common_builder" : "js_builder";
+  const char* builder = IrOpcode::IsCommonOpcode(opcode) ? "common" : "js";
   const char* mnemonic = IrOpcode::IsCommonOpcode(opcode)
                              ? IrOpcode::Mnemonic(opcode)
                              : IrOpcode::Mnemonic(opcode) + 2;
-  PrintF("  op = %s.%s(", builder, mnemonic);
+  PrintF("  op = %s()->%s(", builder, mnemonic);
   switch (opcode) {
     case IrOpcode::kParameter:
-    case IrOpcode::kNumberConstant:
-      PrintF("0");
+      PrintF("%d", ParameterIndexOf(op));
       break;
-    case IrOpcode::kLoad:
-      PrintF("unique_name");
+    case IrOpcode::kNumberConstant:
+      PrintF("%g", OpParameter<double>(op));
       break;
     case IrOpcode::kHeapConstant:
       PrintF("unique_constant");
       break;
     case IrOpcode::kPhi:
+      PrintF("kMachAnyTagged, %d", op->ValueInputCount());
+      break;
+    case IrOpcode::kStateValues:
       PrintF("%d", op->ValueInputCount());
       break;
     case IrOpcode::kEffectPhi:
@@ -68,6 +73,12 @@
     case IrOpcode::kMerge:
       PrintF("%d", op->ControlInputCount());
       break;
+    case IrOpcode::kStart:
+      PrintF("%d", op->ValueOutputCount() - 3);
+      break;
+    case IrOpcode::kFrameState:
+      PrintF("JS_FRAME, BailoutId(-1), OutputFrameStateCombine::Ignore()");
+      break;
     default:
       break;
   }
@@ -75,6 +86,7 @@
 }
 
 #endif  // DEBUG
-}
-}
-}  // namespace v8::internal::compiler
+
+}  // namespace compiler
+}  // namespace internal
+}  // namespace v8