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/heap/scavenger.h b/src/heap/scavenger.h
new file mode 100644
index 0000000..5d0abf4
--- /dev/null
+++ b/src/heap/scavenger.h
@@ -0,0 +1,72 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_HEAP_SCAVENGER_H_
+#define V8_HEAP_SCAVENGER_H_
+
+#include "src/heap/objects-visiting.h"
+
+namespace v8 {
+namespace internal {
+
+typedef void (*ScavengingCallback)(Map* map, HeapObject** slot,
+                                   HeapObject* object);
+
+class Scavenger {
+ public:
+  explicit Scavenger(Heap* heap) : heap_(heap) {}
+
+  // Initializes static visitor dispatch tables.
+  static void Initialize();
+
+  // Callback function passed to Heap::Iterate etc.  Copies an object if
+  // necessary, the object might be promoted to an old space.  The caller must
+  // ensure the precondition that the object is (a) a heap object and (b) in
+  // the heap's from space.
+  static inline void ScavengeObject(HeapObject** p, HeapObject* object);
+
+  // Slow part of {ScavengeObject} above.
+  static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
+
+  // Chooses an appropriate static visitor table depending on the current state
+  // of the heap (i.e. incremental marking, logging and profiling).
+  void SelectScavengingVisitorsTable();
+
+  Isolate* isolate();
+  Heap* heap() { return heap_; }
+
+ private:
+  Heap* heap_;
+  VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_;
+};
+
+
+// Helper class for turning the scavenger into an object visitor that is also
+// filtering out non-HeapObjects and objects which do not reside in new space.
+class ScavengeVisitor : public ObjectVisitor {
+ public:
+  explicit ScavengeVisitor(Heap* heap) : heap_(heap) {}
+
+  void VisitPointer(Object** p) override;
+  void VisitPointers(Object** start, Object** end) override;
+
+ private:
+  inline void ScavengePointer(Object** p);
+
+  Heap* heap_;
+};
+
+
+// Helper class for turning the scavenger into an object visitor that is also
+// filtering out non-HeapObjects and objects which do not reside in new space.
+class StaticScavengeVisitor
+    : public StaticNewSpaceVisitor<StaticScavengeVisitor> {
+ public:
+  static inline void VisitPointer(Heap* heap, HeapObject* object, Object** p);
+};
+
+}  // namespace internal
+}  // namespace v8
+
+#endif  // V8_HEAP_SCAVENGER_H_