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/mips/virtual-frame-mips.h b/src/mips/virtual-frame-mips.h
index 79f973f..b32e2ae 100644
--- a/src/mips/virtual-frame-mips.h
+++ b/src/mips/virtual-frame-mips.h
@@ -39,18 +39,18 @@
 // -------------------------------------------------------------------------
 // Virtual frames
 //
-// The virtual frame is an abstraction of the physical stack frame.  It
+// The virtual frame is an abstraction of the physical stack frame. It
 // encapsulates the parameters, frame-allocated locals, and the expression
-// stack.  It supports push/pop operations on the expression stack, as well
+// stack. It supports push/pop operations on the expression stack, as well
 // as random access to the expression stack elements, locals, and
 // parameters.
 
 class VirtualFrame : public ZoneObject {
  public:
   // A utility class to introduce a scope where the virtual frame is
-  // expected to remain spilled.  The constructor spills the code
+  // expected to remain spilled. The constructor spills the code
   // generator's current frame, but no attempt is made to require it
-  // to stay spilled.  It is intended as documentation while the code
+  // to stay spilled. It is intended as documentation while the code
   // generator is being transformed.
   class SpilledScope BASE_EMBEDDED {
    public:
@@ -61,16 +61,17 @@
   static const int kIllegalIndex = -1;
 
   // Construct an initial virtual frame on entry to a JS function.
-  VirtualFrame();
+  inline VirtualFrame();
 
   // Construct a virtual frame as a clone of an existing one.
-  explicit VirtualFrame(VirtualFrame* original);
+  explicit inline VirtualFrame(VirtualFrame* original);
 
   CodeGenerator* cgen() { return CodeGeneratorScope::Current(); }
   MacroAssembler* masm() { return cgen()->masm(); }
 
   // Create a duplicate of an existing valid frame element.
-  FrameElement CopyElementAt(int index);
+  FrameElement CopyElementAt(int index,
+                             NumberInfo info = NumberInfo::Unknown());
 
   // The number of elements on the virtual frame.
   int element_count() { return elements_.length(); }
@@ -104,12 +105,12 @@
   }
 
   // Add extra in-memory elements to the top of the frame to match an actual
-  // frame (eg, the frame after an exception handler is pushed).  No code is
+  // frame (eg, the frame after an exception handler is pushed). No code is
   // emitted.
   void Adjust(int count);
 
   // Forget elements from the top of the frame to match an actual frame (eg,
-  // the frame after a runtime call).  No code is emitted.
+  // the frame after a runtime call). No code is emitted.
   void Forget(int count) {
     ASSERT(count >= 0);
     ASSERT(stack_pointer_ == element_count() - 1);
@@ -120,7 +121,7 @@
   }
 
   // Forget count elements from the top of the frame and adjust the stack
-  // pointer downward.  This is used, for example, before merging frames at
+  // pointer downward. This is used, for example, before merging frames at
   // break, continue, and return targets.
   void ForgetElements(int count);
 
@@ -132,24 +133,24 @@
     if (is_used(reg)) SpillElementAt(register_location(reg));
   }
 
-  // Spill all occurrences of an arbitrary register if possible.  Return the
+  // Spill all occurrences of an arbitrary register if possible. Return the
   // register spilled or no_reg if it was not possible to free any register
   // (ie, they all have frame-external references).
   Register SpillAnyRegister();
 
   // Prepare this virtual frame for merging to an expected frame by
   // performing some state changes that do not require generating
-  // code.  It is guaranteed that no code will be generated.
+  // code. It is guaranteed that no code will be generated.
   void PrepareMergeTo(VirtualFrame* expected);
 
   // Make this virtual frame have a state identical to an expected virtual
-  // frame.  As a side effect, code may be emitted to make this frame match
+  // frame. As a side effect, code may be emitted to make this frame match
   // the expected one.
   void MergeTo(VirtualFrame* expected);
 
-  // Detach a frame from its code generator, perhaps temporarily.  This
+  // Detach a frame from its code generator, perhaps temporarily. This
   // tells the register allocator that it is free to use frame-internal
-  // registers.  Used when the code generator's frame is switched from this
+  // registers. Used when the code generator's frame is switched from this
   // one to NULL by an unconditional jump.
   void DetachFromCodeGenerator() {
     RegisterAllocator* cgen_allocator = cgen()->allocator();
@@ -158,7 +159,7 @@
     }
   }
 
-  // (Re)attach a frame to its code generator.  This informs the register
+  // (Re)attach a frame to its code generator. This informs the register
   // allocator that the frame-internal register references are active again.
   // Used when a code generator's frame is switched from NULL to this one by
   // binding a label.
@@ -169,17 +170,17 @@
     }
   }
 
-  // Emit code for the physical JS entry and exit frame sequences.  After
+  // Emit code for the physical JS entry and exit frame sequences. After
   // calling Enter, the virtual frame is ready for use; and after calling
-  // Exit it should not be used.  Note that Enter does not allocate space in
+  // Exit it should not be used. Note that Enter does not allocate space in
   // the physical frame for storing frame-allocated locals.
   void Enter();
   void Exit();
 
   // Prepare for returning from the frame by spilling locals and
-  // dropping all non-locals elements in the virtual frame.  This
+  // dropping all non-locals elements in the virtual frame. This
   // avoids generating unnecessary merge code when jumping to the
-  // shared return site.  Emits code for spills.
+  // shared return site. Emits code for spills.
   void PrepareForReturn();
 
   // Allocate and initialize the frame-allocated locals.
@@ -193,11 +194,11 @@
     return MemOperand(sp, index * kPointerSize);
   }
 
-  // Random-access store to a frame-top relative frame element.  The result
+  // Random-access store to a frame-top relative frame element. The result
   // becomes owned by the frame and is invalidated.
   void SetElementAt(int index, Result* value);
 
-  // Set a frame element to a constant.  The index is frame-top relative.
+  // Set a frame element to a constant. The index is frame-top relative.
   void SetElementAt(int index, Handle<Object> value) {
     Result temp(value);
     SetElementAt(index, &temp);
@@ -220,13 +221,13 @@
   }
 
   // Push the value of a local frame slot on top of the frame and invalidate
-  // the local slot.  The slot should be written to before trying to read
+  // the local slot. The slot should be written to before trying to read
   // from it again.
   void TakeLocalAt(int index) {
     TakeFrameSlotAt(local0_index() + index);
   }
 
-  // Store the top value on the virtual frame into a local frame slot.  The
+  // Store the top value on the virtual frame into a local frame slot. The
   // value is left in place on top of the frame.
   void StoreToLocalAt(int index) {
     StoreToFrameSlotAt(local0_index() + index);
@@ -266,7 +267,7 @@
   }
 
   // Push the value of a paramter frame slot on top of the frame and
-  // invalidate the parameter slot.  The slot should be written to before
+  // invalidate the parameter slot. The slot should be written to before
   // trying to read from it again.
   void TakeParameterAt(int index) {
     TakeFrameSlotAt(param0_index() + index);
@@ -291,12 +292,8 @@
     RawCallStub(stub);
   }
 
-  // Call stub that expects its argument in r0.  The argument is given
-  // as a result which must be the register r0.
   void CallStub(CodeStub* stub, Result* arg);
 
-  // Call stub that expects its arguments in r1 and r0.  The arguments
-  // are given as results which must be the appropriate registers.
   void CallStub(CodeStub* stub, Result* arg0, Result* arg1);
 
   // Call runtime given the number of arguments expected on (and
@@ -316,7 +313,7 @@
                      int arg_count);
 
   // Call into an IC stub given the number of arguments it removes
-  // from the stack.  Register arguments are passed as results and
+  // from the stack. Register arguments are passed as results and
   // consumed by the call.
   void CallCodeObject(Handle<Code> ic,
                       RelocInfo::Mode rmode,
@@ -332,8 +329,8 @@
                       int dropped_args,
                       bool set_auto_args_slots = false);
 
-  // Drop a number of elements from the top of the expression stack.  May
-  // emit code to affect the physical frame.  Does not clobber any registers
+  // Drop a number of elements from the top of the expression stack. May
+  // emit code to affect the physical frame. Does not clobber any registers
   // excepting possibly the stack pointer.
   void Drop(int count);
   // Similar to VirtualFrame::Drop but we don't modify the actual stack.
@@ -347,7 +344,7 @@
   // Duplicate the top element of the frame.
   void Dup() { PushFrameSlotAt(element_count() - 1); }
 
-  // Pop an element from the top of the expression stack.  Returns a
+  // Pop an element from the top of the expression stack. Returns a
   // Result, which may be a constant or a register.
   Result Pop();
 
@@ -355,20 +352,20 @@
   // emit a corresponding pop instruction.
   void EmitPop(Register reg);
   // Same but for multiple registers
-  void EmitMultiPop(RegList regs);  // higher indexed registers popped first
-  void EmitMultiPopReversed(RegList regs);  // lower first
+  void EmitMultiPop(RegList regs);
+  void EmitMultiPopReversed(RegList regs);
 
   // Push an element on top of the expression stack and emit a
   // corresponding push instruction.
   void EmitPush(Register reg);
   // Same but for multiple registers.
-  void EmitMultiPush(RegList regs);  // lower indexed registers are pushed first
-  void EmitMultiPushReversed(RegList regs);  // higher first
+  void EmitMultiPush(RegList regs);
+  void EmitMultiPushReversed(RegList regs);
 
   // Push an element on the virtual frame.
-  void Push(Register reg);
-  void Push(Handle<Object> value);
-  void Push(Smi* value) { Push(Handle<Object>(value)); }
+  inline void Push(Register reg, NumberInfo info = NumberInfo::Unknown());
+  inline void Push(Handle<Object> value);
+  inline void Push(Smi* value);
 
   // Pushing a result invalidates it (its contents become owned by the frame).
   void Push(Result* result) {
@@ -383,13 +380,16 @@
 
   // Nip removes zero or more elements from immediately below the top
   // of the frame, leaving the previous top-of-frame value on top of
-  // the frame.  Nip(k) is equivalent to x = Pop(), Drop(k), Push(x).
-  void Nip(int num_dropped);
+  // the frame. Nip(k) is equivalent to x = Pop(), Drop(k), Push(x).
+  inline void Nip(int num_dropped);
 
   // This pushes 4 arguments slots on the stack and saves asked 'a' registers
   // 'a' registers are arguments register a0 to a3.
   void EmitArgumentSlots(RegList reglist);
 
+  inline void SetTypeForLocalAt(int index, NumberInfo info);
+  inline void SetTypeForParamAt(int index, NumberInfo info);
+
  private:
   static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset;
   static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset;
@@ -413,23 +413,23 @@
   int local_count() { return cgen()->scope()->num_stack_slots(); }
 
   // The index of the element that is at the processor's frame pointer
-  // (the fp register).  The parameters, receiver, function, and context
+  // (the fp register). The parameters, receiver, function, and context
   // are below the frame pointer.
   int frame_pointer() { return parameter_count() + 3; }
 
-  // The index of the first parameter.  The receiver lies below the first
+  // The index of the first parameter. The receiver lies below the first
   // parameter.
   int param0_index() { return 1; }
 
-  // The index of the context slot in the frame.  It is immediately
+  // The index of the context slot in the frame. It is immediately
   // below the frame pointer.
   int context_index() { return frame_pointer() - 1; }
 
-  // The index of the function slot in the frame.  It is below the frame
+  // The index of the function slot in the frame. It is below the frame
   // pointer and context slot.
   int function_index() { return frame_pointer() - 2; }
 
-  // The index of the first local.  Between the frame pointer and the
+  // The index of the first local. Between the frame pointer and the
   // locals lies the return address.
   int local0_index() { return frame_pointer() + 2; }
 
@@ -444,7 +444,7 @@
     return (frame_pointer() - index) * kPointerSize;
   }
 
-  // Record an occurrence of a register in the virtual frame.  This has the
+  // Record an occurrence of a register in the virtual frame. This has the
   // effect of incrementing the register's external reference count and
   // of updating the index of the register's location in the frame.
   void Use(Register reg, int index) {
@@ -453,7 +453,7 @@
     cgen()->allocator()->Use(reg);
   }
 
-  // Record that a register reference has been dropped from the frame.  This
+  // Record that a register reference has been dropped from the frame. This
   // decrements the register's external reference count and invalidates the
   // index of the register's location in the frame.
   void Unuse(Register reg) {
@@ -467,7 +467,7 @@
   // constant.
   void SpillElementAt(int index);
 
-  // Sync the element at a particular index.  If it is a register or
+  // Sync the element at a particular index. If it is a register or
   // constant that disagrees with the value on the stack, write it to memory.
   // Keep the element type as register or constant, and clear the dirty bit.
   void SyncElementAt(int index);
@@ -483,7 +483,7 @@
 
   // Push a copy of a frame slot (typically a local or parameter) on top of
   // the frame.
-  void PushFrameSlotAt(int index);
+  inline void PushFrameSlotAt(int index);
 
   // Push a the value of a frame slot (typically a local or parameter) on
   // top of the frame and invalidate the slot.
@@ -494,7 +494,7 @@
   void StoreToFrameSlotAt(int index);
 
   // Spill all elements in registers. Spill the top spilled_args elements
-  // on the frame.  Sync all other frame elements.
+  // on the frame. Sync all other frame elements.
   // Then drop dropped_args elements from the virtual frame, to match
   // the effect of an upcoming call that will drop them from the stack.
   void PrepareForCall(int spilled_args, int dropped_args);
@@ -515,14 +515,14 @@
   // Make the memory-to-register and constant-to-register moves
   // needed to make this frame equal the expected frame.
   // Called after all register-to-memory and register-to-register
-  // moves have been made.  After this function returns, the frames
+  // moves have been made. After this function returns, the frames
   // should be equal.
   void MergeMoveMemoryToRegisters(VirtualFrame* expected);
 
   // Invalidates a frame slot (puts an invalid frame element in it).
   // Copies on the frame are correctly handled, and if this slot was
   // the backing store of copies, the index of the new backing store
-  // is returned.  Otherwise, returns kIllegalIndex.
+  // is returned. Otherwise, returns kIllegalIndex.
   // Register counts are correctly updated.
   int InvalidateFrameSlotAt(int index);
 
@@ -534,7 +534,7 @@
   // (via PrepareForCall).
   void RawCallCodeObject(Handle<Code> code, RelocInfo::Mode rmode);
 
-  bool Equals(VirtualFrame* other);
+  inline bool Equals(VirtualFrame* other);
 
   // Classes that need raw access to the elements_ array.
   friend class DeferredCode;