Update V8 to r4588

We're using WebKit r58033, as used by
http://src.chromium.org/svn/releases/5.0.387.0/DEPS
This requires http://v8.googlecode.com/svn/trunk@4465 but this version has a
crashing bug for ARM. Instead we use http://v8.googlecode.com/svn/trunk@4588,
which is used by http://src.chromium.org/svn/releases/6.0.399.0/DEPS

Note that a trivial bug fix was required in arm/codegen-arm.cc. This is guarded
with ANDROID. See http://code.google.com/p/v8/issues/detail?id=703

Change-Id: I459647a8286c4f8c7405f0c5581ecbf051a6f1e8
diff --git a/src/d8-debug.cc b/src/d8-debug.cc
index 4e0243a..5f3ed76 100644
--- a/src/d8-debug.cc
+++ b/src/d8-debug.cc
@@ -34,6 +34,11 @@
 
 namespace v8 {
 
+void PrintPrompt() {
+  printf("dbg> ");
+  fflush(stdout);
+}
+
 
 void HandleDebugEvent(DebugEvent event,
                       Handle<Object> exec_state,
@@ -86,7 +91,7 @@
   bool running = false;
   while (!running) {
     char command[kBufferSize];
-    printf("dbg> ");
+    PrintPrompt();
     char* str = fgets(command, kBufferSize, stdin);
     if (str == NULL) break;
 
@@ -178,6 +183,7 @@
   // Start the keyboard thread.
   KeyboardThread keyboard(this);
   keyboard.Start();
+  PrintPrompt();
 
   // Process events received from debugged VM and from the keyboard.
   bool terminate = false;
@@ -264,7 +270,8 @@
   Handle<Object> details =
       Shell::DebugMessageDetails(Handle<String>::Cast(String::New(message)));
   if (try_catch.HasCaught()) {
-      Shell::ReportException(&try_catch);
+    Shell::ReportException(&try_catch);
+    PrintPrompt();
     return;
   }
   String::Utf8Value str(details->Get(String::New("text")));
@@ -277,7 +284,7 @@
   } else {
     printf("???\n");
   }
-  printf("dbg> ");
+  PrintPrompt();
 }
 
 
@@ -289,13 +296,17 @@
   Handle<Value> request =
       Shell::DebugCommandToJSONRequest(String::New(command));
   if (try_catch.HasCaught()) {
-    Shell::ReportException(&try_catch);
+    v8::String::Utf8Value exception(try_catch.Exception());
+    const char* exception_string = Shell::ToCString(exception);
+    printf("%s\n", exception_string);
+    PrintPrompt();
     return;
   }
 
   // If undefined is returned the command was handled internally and there is
   // no JSON to send.
   if (request->IsUndefined()) {
+    PrintPrompt();
     return;
   }