Version 2.3.4

Fixed problems in implementation of ES5 function.prototype.bind.

Fixed error when using apply with arguments object on ARM (issue 784).

Added setting of global flags to debugger protocol.

Fixed an error affecting cached results of sin and cos (issue 792).

Removed memory leak from a boundary case where V8 is not initialized.

Fixed issue where debugger could set breakpoints outside the body of a function.

Fixed issue in debugger when using both live edit and step in features.

Added Number-letter (Nl) category to Unicode tables.  These characters can now be used in identifiers.

Fixed an assert failure on X64 (issue 806).

Performance improvements on all platforms.


git-svn-id: http://v8.googlecode.com/svn/trunk@5164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/debug.h b/src/debug.h
index 7bb4a42..b6aba5a 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -332,6 +332,7 @@
     k_after_break_target_address,
     k_debug_break_return_address,
     k_debug_break_slot_address,
+    k_restarter_frame_function_pointer,
     k_register_address
   };
 
@@ -339,6 +340,10 @@
   static Address* after_break_target_address() {
     return reinterpret_cast<Address*>(&thread_local_.after_break_target_);
   }
+  static Address* restarter_frame_function_pointer_address() {
+    Object*** address = &thread_local_.restarter_frame_function_pointer_;
+    return reinterpret_cast<Address*>(address);
+  }
 
   // Support for saving/restoring registers when handling debug break calls.
   static Object** register_address(int r) {
@@ -415,10 +420,22 @@
   };
 
   static void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
-                                    FrameDropMode mode);
+                                    FrameDropMode mode,
+                                    Object** restarter_frame_function_pointer);
 
-  static void SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
-                                     Handle<Code> code);
+  // Initializes an artificial stack frame. The data it contains is used for:
+  //  a. successful work of frame dropper code which eventually gets control,
+  //  b. being compatible with regular stack structure for various stack
+  //     iterators.
+  // Returns address of stack allocated pointer to restarted function,
+  // the value that is called 'restarter_frame_function_pointer'. The value
+  // at this address (possibly updated by GC) may be used later when preparing
+  // 'step in' operation.
+  // The implementation is architecture-specific.
+  // TODO(LiveEdit): consider reviewing it as architecture-independent.
+  static Object** SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
+                                         Handle<Code> code);
+
   static const int kFrameDropperFrameSize;
 
  private:
@@ -495,6 +512,11 @@
 
     // Pending interrupts scheduled while debugging.
     int pending_interrupts_;
+
+    // When restarter frame is on stack, stores the address
+    // of the pointer to function being restarted. Otherwise (most of the time)
+    // stores NULL. This pointer is used with 'step in' implementation.
+    Object** restarter_frame_function_pointer_;
   };
 
   // Storage location for registers when handling debug break calls
@@ -906,8 +928,6 @@
 // Stack allocated class for disabling break.
 class DisableBreak BASE_EMBEDDED {
  public:
-  // Enter the debugger by storing the previous top context and setting the
-  // current top context to the debugger context.
   explicit DisableBreak(bool disable_break)  {
     prev_disable_break_ = Debug::disable_break();
     Debug::set_disable_break(disable_break);
@@ -940,6 +960,10 @@
     return Debug_Address(Debug::k_debug_break_return_address);
   }
 
+  static Debug_Address RestarterFrameFunctionPointer() {
+    return Debug_Address(Debug::k_restarter_frame_function_pointer);
+  }
+
   static Debug_Address Register(int reg) {
     return Debug_Address(Debug::k_register_address, reg);
   }
@@ -952,6 +976,9 @@
         return reinterpret_cast<Address>(Debug::debug_break_return_address());
       case Debug::k_debug_break_slot_address:
         return reinterpret_cast<Address>(Debug::debug_break_slot_address());
+      case Debug::k_restarter_frame_function_pointer:
+        return reinterpret_cast<Address>(
+            Debug::restarter_frame_function_pointer_address());
       case Debug::k_register_address:
         return reinterpret_cast<Address>(Debug::register_address(reg_));
       default: