Update V8 to r5091 as required by WebKit r63859.

Change-Id: I8e35d765e6f6c7f89eccff900e1cabe2d5dd6110
diff --git a/src/compiler.cc b/src/compiler.cc
index ebb9743..d87d9da 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -40,6 +40,7 @@
 #include "oprofile-agent.h"
 #include "rewriter.h"
 #include "scopes.h"
+#include "scopeinfo.h"
 
 namespace v8 {
 namespace internal {
@@ -156,7 +157,12 @@
 #ifdef ENABLE_DEBUGGER_SUPPORT
 Handle<Code> MakeCodeForLiveEdit(CompilationInfo* info) {
   Handle<Context> context = Handle<Context>::null();
-  return MakeCode(context, info);
+  Handle<Code> code = MakeCode(context, info);
+  if (!info->shared_info().is_null()) {
+    info->shared_info()->set_scope_info(
+        *SerializedScopeInfo::Create(info->scope()));
+  }
+  return code;
 }
 #endif
 
@@ -252,9 +258,11 @@
 
   // Allocate function.
   Handle<SharedFunctionInfo> result =
-      Factory::NewSharedFunctionInfo(lit->name(),
-                                     lit->materialized_literal_count(),
-                                     code);
+      Factory::NewSharedFunctionInfo(
+          lit->name(),
+          lit->materialized_literal_count(),
+          code,
+          SerializedScopeInfo::Create(info.scope()));
 
   ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position());
   Compiler::SetFunctionInfo(result, lit, true, script);
@@ -275,9 +283,6 @@
 }
 
 
-static StaticResource<SafeStringInputBuffer> safe_string_input_buffer;
-
-
 Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
                                              Handle<Object> script_name,
                                              int line_offset,
@@ -306,9 +311,7 @@
     // No cache entry found. Do pre-parsing and compile the script.
     ScriptDataImpl* pre_data = input_pre_data;
     if (pre_data == NULL && source_length >= FLAG_min_preparse_length) {
-      Access<SafeStringInputBuffer> buf(&safe_string_input_buffer);
-      buf->Reset(source.location());
-      pre_data = PreParse(source, buf.value(), extension);
+      pre_data = PreParse(source, NULL, extension);
     }
 
     // Create a script object describing the script to be compiled.
@@ -445,7 +448,12 @@
                             info->script(),
                             code);
 
-  // Update the shared function info with the compiled code.
+  // Update the shared function info with the compiled code and the scope info.
+  // Please note, that the order of the sharedfunction initialization is
+  // important since set_scope_info might trigger a GC, causing the ASSERT
+  // below to be invalid if the code was flushed. By settting the code
+  // object last we avoid this.
+  shared->set_scope_info(*SerializedScopeInfo::Create(info->scope()));
   shared->set_code(*code);
 
   // Set the expected number of properties for instances.
@@ -481,6 +489,8 @@
   bool allow_lazy = literal->AllowsLazyCompilation() &&
       !LiveEditFunctionTracker::IsActive();
 
+  Handle<SerializedScopeInfo> scope_info(SerializedScopeInfo::Empty());
+
   // Generate code
   Handle<Code> code;
   if (FLAG_lazy && allow_lazy) {
@@ -562,13 +572,15 @@
                               literal->start_position(),
                               script,
                               code);
+    scope_info = SerializedScopeInfo::Create(info.scope());
   }
 
   // Create a shared function info object.
   Handle<SharedFunctionInfo> result =
       Factory::NewSharedFunctionInfo(literal->name(),
                                      literal->materialized_literal_count(),
-                                     code);
+                                     code,
+                                     scope_info);
   SetFunctionInfo(result, literal, false, script);
 
   // Set the expected number of properties for instances and return