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/arguments.h b/src/arguments.h
index e6c6db5..d11a8cd 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -29,10 +29,13 @@
 class Arguments BASE_EMBEDDED {
  public:
   Arguments(int length, Object** arguments)
-      : length_(length), arguments_(arguments) { }
+      : length_(length), arguments_(arguments) {
+    DCHECK_GE(length_, 0);
+  }
 
   Object*& operator[] (int index) {
-    DCHECK(0 <= index && index < length_);
+    DCHECK_GE(index, 0);
+    DCHECK_LT(static_cast<uint32_t>(index), static_cast<uint32_t>(length_));
     return *(reinterpret_cast<Object**>(reinterpret_cast<intptr_t>(arguments_) -
                                         index * kPointerSize));
   }
@@ -58,6 +61,10 @@
 
   Object** arguments() { return arguments_; }
 
+  Object** lowest_address() { return &this->operator[](length() - 1); }
+
+  Object** highest_address() { return &this->operator[](0); }
+
  private:
   intptr_t length_;
   Object** arguments_;
@@ -124,8 +131,8 @@
  protected:
   explicit inline CustomArguments(Isolate* isolate) : Super(isolate) {}
 
-  template<typename V>
-  v8::Handle<V> GetReturnValue(Isolate* isolate);
+  template <typename V>
+  v8::Local<V> GetReturnValue(Isolate* isolate);
 
   inline Isolate* isolate() {
     return reinterpret_cast<Isolate*>(this->begin()[T::kIsolateIndex]);
@@ -173,14 +180,14 @@
    * and used if it's been set to anything inside the callback.
    * New style callbacks always use the return value.
    */
-#define WRITE_CALL_0(Function, ReturnValue)                                  \
-  v8::Handle<ReturnValue> Call(Function f);                                  \
+#define WRITE_CALL_0(Function, ReturnValue) \
+  v8::Local<ReturnValue> Call(Function f);
 
-#define WRITE_CALL_1(Function, ReturnValue, Arg1)                            \
-  v8::Handle<ReturnValue> Call(Function f, Arg1 arg1);                       \
+#define WRITE_CALL_1(Function, ReturnValue, Arg1) \
+  v8::Local<ReturnValue> Call(Function f, Arg1 arg1);
 
-#define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2)                      \
-  v8::Handle<ReturnValue> Call(Function f, Arg1 arg1, Arg2 arg2);            \
+#define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \
+  v8::Local<ReturnValue> Call(Function f, Arg1 arg1, Arg2 arg2);
 
 #define WRITE_CALL_2_VOID(Function, ReturnValue, Arg1, Arg2)                 \
   void Call(Function f, Arg1 arg1, Arg2 arg2);                               \
@@ -246,7 +253,7 @@
    * and used if it's been set to anything inside the callback.
    * New style callbacks always use the return value.
    */
-  v8::Handle<v8::Value> Call(FunctionCallback f);
+  v8::Local<v8::Value> Call(FunctionCallback f);
 
  private:
   internal::Object** argv_;
@@ -265,9 +272,6 @@
 #endif
 
 
-#define DECLARE_RUNTIME_FUNCTION(Name)    \
-Object* Name(int args_length, Object** args_object, Isolate* isolate)
-
 #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name)                        \
 static INLINE(Type __RT_impl_##Name(Arguments args, Isolate* isolate));  \
 Type Name(int args_length, Object** args_object, Isolate* isolate) {     \
@@ -282,9 +286,7 @@
 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \
     RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name)
 
-#define RUNTIME_ARGUMENTS(isolate, args) \
-  args.length(), args.arguments(), isolate
-
-} }  // namespace v8::internal
+}  // namespace internal
+}  // namespace v8
 
 #endif  // V8_ARGUMENTS_H_