1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include "src/allocation.h"
9 #include "src/arguments.h"
10 #include "src/assembler.h"
11 #include "src/base/atomicops.h"
12 #include "src/base/platform/platform.h"
13 #include "src/execution.h"
14 #include "src/factory.h"
15 #include "src/flags.h"
16 #include "src/frames-inl.h"
17 #include "src/hashmap.h"
18 #include "src/liveedit.h"
19 #include "src/string-stream.h"
20 #include "src/v8threads.h"
22 #include "include/v8-debug.h"
28 // Forward declarations.
32 // Step actions. NOTE: These values are in macros.py as well.
34 StepNone = -1, // Stepping not prepared.
35 StepOut = 0, // Step out of the current function.
36 StepNext = 1, // Step to the next statement in the current function.
37 StepIn = 2, // Step into new functions invoked or the next statement
38 // in the current function.
39 StepMin = 3, // Perform a minimum step in the current function.
40 StepInMin = 4, // Step into new functions invoked or perform a minimum step
41 // in the current function.
42 StepFrame = 5 // Step into a new frame or return to previous frame.
46 // Type of exception break. NOTE: These values are in macros.py as well.
47 enum ExceptionBreakType {
49 BreakUncaughtException = 1
53 // Type of exception break.
54 enum BreakLocatorType {
55 ALL_BREAK_LOCATIONS = 0,
56 SOURCE_BREAK_LOCATIONS = 1,
61 // The different types of breakpoint position alignments.
62 // Must match Debug.BreakPositionAlignment in debug-debugger.js
63 enum BreakPositionAlignment {
64 STATEMENT_ALIGNED = 0,
65 BREAK_POSITION_ALIGNED = 1
69 // Class for iterating through the break points in a function and changing
71 class BreakLocationIterator {
73 explicit BreakLocationIterator(Handle<DebugInfo> debug_info,
74 BreakLocatorType type);
75 virtual ~BreakLocationIterator();
79 void FindBreakLocationFromAddress(Address pc);
80 void FindBreakLocationFromPosition(int position,
81 BreakPositionAlignment alignment);
84 void SetBreakPoint(Handle<Object> break_point_object);
85 void ClearBreakPoint(Handle<Object> break_point_object);
88 bool IsStepInLocation(Isolate* isolate);
89 void PrepareStepIn(Isolate* isolate);
93 Object* BreakPointObjects();
94 void ClearAllDebugBreak();
97 inline int code_position() {
98 return static_cast<int>(pc() - debug_info_->code()->entry());
100 inline int break_point() { return break_point_; }
101 inline int position() { return position_; }
102 inline int statement_position() { return statement_position_; }
103 inline Address pc() { return reloc_iterator_->rinfo()->pc(); }
104 inline Code* code() { return debug_info_->code(); }
105 inline RelocInfo* rinfo() { return reloc_iterator_->rinfo(); }
106 inline RelocInfo::Mode rmode() const {
107 return reloc_iterator_->rinfo()->rmode();
109 inline RelocInfo* original_rinfo() {
110 return reloc_iterator_original_->rinfo();
112 inline RelocInfo::Mode original_rmode() const {
113 return reloc_iterator_original_->rinfo()->rmode();
116 bool IsDebuggerStatement();
119 bool RinfoDone() const;
122 BreakLocatorType type_;
125 int statement_position_;
126 Handle<DebugInfo> debug_info_;
127 RelocIterator* reloc_iterator_;
128 RelocIterator* reloc_iterator_original_;
131 void SetDebugBreak();
132 void ClearDebugBreak();
134 void SetDebugBreakAtIC();
135 void ClearDebugBreakAtIC();
137 bool IsDebugBreakAtReturn();
138 void SetDebugBreakAtReturn();
139 void ClearDebugBreakAtReturn();
141 bool IsDebugBreakSlot();
142 bool IsDebugBreakAtSlot();
143 void SetDebugBreakAtSlot();
144 void ClearDebugBreakAtSlot();
146 DISALLOW_COPY_AND_ASSIGN(BreakLocationIterator);
150 // Cache of all script objects in the heap. When a script is added a weak handle
151 // to it is created and that weak handle is stored in the cache. The weak handle
152 // callback takes care of removing the script from the cache. The key used in
153 // the cache is the script id.
154 class ScriptCache : private HashMap {
156 explicit ScriptCache(Isolate* isolate);
157 virtual ~ScriptCache() { Clear(); }
159 // Add script to the cache.
160 void Add(Handle<Script> script);
162 // Return the scripts in the cache.
163 Handle<FixedArray> GetScripts();
166 // Calculate the hash value from the key (script id).
167 static uint32_t Hash(int key) {
168 return ComputeIntegerHash(key, v8::internal::kZeroHashSeed);
171 // Clear the cache releasing all the weak handles.
174 // Weak handle callback for scripts in the cache.
175 static void HandleWeakScript(
176 const v8::WeakCallbackData<v8::Value, void>& data);
182 // Linked list holding debug info objects. The debug info objects are kept as
183 // weak handles to avoid a debug info object to keep a function alive.
184 class DebugInfoListNode {
186 explicit DebugInfoListNode(DebugInfo* debug_info);
187 virtual ~DebugInfoListNode();
189 DebugInfoListNode* next() { return next_; }
190 void set_next(DebugInfoListNode* next) { next_ = next; }
191 Handle<DebugInfo> debug_info() { return debug_info_; }
194 // Global (weak) handle to the debug info object.
195 Handle<DebugInfo> debug_info_;
197 // Next pointer for linked list.
198 DebugInfoListNode* next_;
203 // Message delivered to the message handler callback. This is either a debugger
204 // event or the response to a command.
205 class MessageImpl: public v8::Debug::Message {
207 // Create a message object for a debug event.
208 static MessageImpl NewEvent(DebugEvent event,
210 Handle<JSObject> exec_state,
211 Handle<JSObject> event_data);
213 // Create a message object for the response to a debug command.
214 static MessageImpl NewResponse(DebugEvent event,
216 Handle<JSObject> exec_state,
217 Handle<JSObject> event_data,
218 Handle<String> response_json,
219 v8::Debug::ClientData* client_data);
221 // Implementation of interface v8::Debug::Message.
222 virtual bool IsEvent() const;
223 virtual bool IsResponse() const;
224 virtual DebugEvent GetEvent() const;
225 virtual bool WillStartRunning() const;
226 virtual v8::Handle<v8::Object> GetExecutionState() const;
227 virtual v8::Handle<v8::Object> GetEventData() const;
228 virtual v8::Handle<v8::String> GetJSON() const;
229 virtual v8::Handle<v8::Context> GetEventContext() const;
230 virtual v8::Debug::ClientData* GetClientData() const;
231 virtual v8::Isolate* GetIsolate() const;
234 MessageImpl(bool is_event,
237 Handle<JSObject> exec_state,
238 Handle<JSObject> event_data,
239 Handle<String> response_json,
240 v8::Debug::ClientData* client_data);
242 bool is_event_; // Does this message represent a debug event?
243 DebugEvent event_; // Debug event causing the break.
244 bool running_; // Will the VM start running after this event?
245 Handle<JSObject> exec_state_; // Current execution state.
246 Handle<JSObject> event_data_; // Data associated with the event.
247 Handle<String> response_json_; // Response JSON if message holds a response.
248 v8::Debug::ClientData* client_data_; // Client data passed with the request.
252 // Details of the debug event delivered to the debug event listener.
253 class EventDetailsImpl : public v8::Debug::EventDetails {
255 EventDetailsImpl(DebugEvent event,
256 Handle<JSObject> exec_state,
257 Handle<JSObject> event_data,
258 Handle<Object> callback_data,
259 v8::Debug::ClientData* client_data);
260 virtual DebugEvent GetEvent() const;
261 virtual v8::Handle<v8::Object> GetExecutionState() const;
262 virtual v8::Handle<v8::Object> GetEventData() const;
263 virtual v8::Handle<v8::Context> GetEventContext() const;
264 virtual v8::Handle<v8::Value> GetCallbackData() const;
265 virtual v8::Debug::ClientData* GetClientData() const;
267 DebugEvent event_; // Debug event causing the break.
268 Handle<JSObject> exec_state_; // Current execution state.
269 Handle<JSObject> event_data_; // Data associated with the event.
270 Handle<Object> callback_data_; // User data passed with the callback
271 // when it was registered.
272 v8::Debug::ClientData* client_data_; // Data passed to DebugBreakForCommand.
276 // Message send by user to v8 debugger or debugger output message.
277 // In addition to command text it may contain a pointer to some user data
278 // which are expected to be passed along with the command reponse to message
280 class CommandMessage {
282 static CommandMessage New(const Vector<uint16_t>& command,
283 v8::Debug::ClientData* data);
286 // Deletes user data and disposes of the text.
288 Vector<uint16_t> text() const { return text_; }
289 v8::Debug::ClientData* client_data() const { return client_data_; }
291 CommandMessage(const Vector<uint16_t>& text,
292 v8::Debug::ClientData* data);
294 Vector<uint16_t> text_;
295 v8::Debug::ClientData* client_data_;
299 // A Queue of CommandMessage objects. A thread-safe version is
300 // LockingCommandMessageQueue, based on this class.
301 class CommandMessageQueue BASE_EMBEDDED {
303 explicit CommandMessageQueue(int size);
304 ~CommandMessageQueue();
305 bool IsEmpty() const { return start_ == end_; }
306 CommandMessage Get();
307 void Put(const CommandMessage& message);
308 void Clear() { start_ = end_ = 0; } // Queue is empty after Clear().
310 // Doubles the size of the message queue, and copies the messages.
313 CommandMessage* messages_;
316 int size_; // The size of the queue buffer. Queue can hold size-1 messages.
320 // LockingCommandMessageQueue is a thread-safe circular buffer of CommandMessage
321 // messages. The message data is not managed by LockingCommandMessageQueue.
322 // Pointers to the data are passed in and out. Implemented by adding a
323 // Mutex to CommandMessageQueue. Includes logging of all puts and gets.
324 class LockingCommandMessageQueue BASE_EMBEDDED {
326 LockingCommandMessageQueue(Logger* logger, int size);
327 bool IsEmpty() const;
328 CommandMessage Get();
329 void Put(const CommandMessage& message);
333 CommandMessageQueue queue_;
334 mutable base::Mutex mutex_;
335 DISALLOW_COPY_AND_ASSIGN(LockingCommandMessageQueue);
339 // This class contains the debugger support. The main purpose is to handle
340 // setting break points in the code.
342 // This class controls the debug info for all functions which currently have
343 // active breakpoints in them. This debug info is held in the heap root object
344 // debug_info which is a FixedArray. Each entry in this list is of class
348 // Debug event triggers.
349 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue);
351 void OnThrow(Handle<Object> exception, bool uncaught);
352 void OnPromiseReject(Handle<JSObject> promise, Handle<Object> value);
353 void OnCompileError(Handle<Script> script);
354 void OnBeforeCompile(Handle<Script> script);
355 void OnAfterCompile(Handle<Script> script);
356 void OnPromiseEvent(Handle<JSObject> data);
357 void OnAsyncTaskEvent(Handle<JSObject> data);
360 void SetEventListener(Handle<Object> callback, Handle<Object> data);
361 void SetMessageHandler(v8::Debug::MessageHandler handler);
362 void EnqueueCommandMessage(Vector<const uint16_t> command,
363 v8::Debug::ClientData* client_data = NULL);
364 // Enqueue a debugger command to the command queue for event listeners.
365 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL);
366 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun,
367 Handle<Object> data);
368 Handle<Context> GetDebugContext();
369 void HandleDebugBreak();
370 void ProcessDebugMessages(bool debug_command_only);
374 void Break(Arguments args, JavaScriptFrame*);
375 void SetAfterBreakTarget(JavaScriptFrame* frame);
378 Handle<FixedArray> GetLoadedScripts();
380 // Break point handling.
381 bool SetBreakPoint(Handle<JSFunction> function,
382 Handle<Object> break_point_object,
383 int* source_position);
384 bool SetBreakPointForScript(Handle<Script> script,
385 Handle<Object> break_point_object,
386 int* source_position,
387 BreakPositionAlignment alignment);
388 void ClearBreakPoint(Handle<Object> break_point_object);
389 void ClearAllBreakPoints();
390 void FloodWithOneShot(Handle<JSFunction> function,
391 BreakLocatorType type = ALL_BREAK_LOCATIONS);
392 void FloodBoundFunctionWithOneShot(Handle<JSFunction> function);
393 void FloodDefaultConstructorWithOneShot(Handle<JSFunction> function);
394 void FloodWithOneShotGeneric(Handle<JSFunction> function,
395 Handle<Object> holder = Handle<Object>());
396 void FloodHandlerWithOneShot();
397 void ChangeBreakOnException(ExceptionBreakType type, bool enable);
398 bool IsBreakOnException(ExceptionBreakType type);
400 // Stepping handling.
401 void PrepareStep(StepAction step_action,
403 StackFrame::Id frame_id);
404 void ClearStepping();
406 bool IsStepping() { return thread_local_.step_count_ > 0; }
407 bool StepNextContinue(BreakLocationIterator* break_location_iterator,
408 JavaScriptFrame* frame);
409 bool StepInActive() { return thread_local_.step_into_fp_ != 0; }
410 void HandleStepIn(Handle<Object> function_obj, Handle<Object> holder,
411 Address fp, bool is_constructor);
412 bool StepOutActive() { return thread_local_.step_out_fp_ != 0; }
414 // Purge all code objects that have no debug break slots.
415 void PrepareForBreakPoints();
417 // Returns whether the operation succeeded. Compilation can only be triggered
418 // if a valid closure is passed as the second argument, otherwise the shared
419 // function needs to be compiled already.
420 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared,
421 Handle<JSFunction> function);
422 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared);
423 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared);
425 // This function is used in FunctionNameUsing* tests.
426 Object* FindSharedFunctionInfoInScript(Handle<Script> script, int position);
428 // Returns true if the current stub call is patched to call the debugger.
429 static bool IsDebugBreak(Address addr);
430 // Returns true if the current return statement has been patched to be
431 // a debugger breakpoint.
432 static bool IsDebugBreakAtReturn(RelocInfo* rinfo);
434 static Handle<Object> GetSourceBreakLocations(
435 Handle<SharedFunctionInfo> shared,
436 BreakPositionAlignment position_aligment);
438 // Check whether a global object is the debug global object.
439 bool IsDebugGlobal(GlobalObject* global);
441 // Check whether this frame is just about to return.
442 bool IsBreakAtReturn(JavaScriptFrame* frame);
444 // Support for LiveEdit
445 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
446 LiveEdit::FrameDropMode mode,
447 Object** restarter_frame_function_pointer);
449 // Passed to MakeWeak.
450 static void HandlePhantomDebugInfo(
451 const PhantomCallbackData<DebugInfoListNode>& data);
453 // Threading support.
454 char* ArchiveDebug(char* to);
455 char* RestoreDebug(char* from);
456 static int ArchiveSpacePerThread();
457 void FreeThreadResources() { }
459 // Record function from which eval was called.
460 static void RecordEvalCaller(Handle<Script> script);
462 bool CheckExecutionState(int id) {
463 return !debug_context().is_null() && break_id() != 0 && break_id() == id;
467 DebugScope* debugger_entry() {
468 return reinterpret_cast<DebugScope*>(
469 base::NoBarrier_Load(&thread_local_.current_debug_scope_));
471 inline Handle<Context> debug_context() { return debug_context_; }
472 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; }
473 bool live_edit_enabled() const {
474 return FLAG_enable_liveedit && live_edit_enabled_ ;
477 inline bool is_active() const { return is_active_; }
478 inline bool is_loaded() const { return !debug_context_.is_null(); }
479 inline bool has_break_points() const { return has_break_points_; }
480 inline bool in_debug_scope() const {
481 return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_);
483 void set_disable_break(bool v) { break_disabled_ = v; }
485 StackFrame::Id break_frame_id() { return thread_local_.break_frame_id_; }
486 int break_id() { return thread_local_.break_id_; }
488 // Support for embedding into generated code.
489 Address is_active_address() {
490 return reinterpret_cast<Address>(&is_active_);
493 Address after_break_target_address() {
494 return reinterpret_cast<Address>(&after_break_target_);
497 Address restarter_frame_function_pointer_address() {
498 Object*** address = &thread_local_.restarter_frame_function_pointer_;
499 return reinterpret_cast<Address>(address);
502 Address step_in_fp_addr() {
503 return reinterpret_cast<Address>(&thread_local_.step_into_fp_);
506 StepAction last_step_action() { return thread_local_.last_step_action_; }
509 explicit Debug(Isolate* isolate);
513 void SetNextBreakId() {
514 thread_local_.break_id_ = ++thread_local_.break_count_;
517 // Check whether there are commands in the command queue.
518 inline bool has_commands() const { return !command_queue_.IsEmpty(); }
519 inline bool ignore_events() const { return is_suppressed_ || !is_active_; }
520 inline bool break_disabled() const {
521 return break_disabled_ || in_debug_event_listener_;
524 void OnException(Handle<Object> exception, bool uncaught,
525 Handle<Object> promise);
527 // Constructors for debug event objects.
528 MUST_USE_RESULT MaybeHandle<Object> MakeJSObject(
529 const char* constructor_name,
531 Handle<Object> argv[]);
532 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState();
533 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent(
534 Handle<Object> break_points_hit);
535 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent(
536 Handle<Object> exception,
538 Handle<Object> promise);
539 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent(
540 Handle<Script> script, v8::DebugEvent type);
541 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent(
542 Handle<JSObject> promise_event);
543 MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent(
544 Handle<JSObject> task_event);
546 // Mirror cache handling.
547 void ClearMirrorCache();
549 MaybeHandle<Object> PromiseHasUserDefinedRejectHandler(
550 Handle<JSObject> promise);
552 void CallEventCallback(v8::DebugEvent event,
553 Handle<Object> exec_state,
554 Handle<Object> event_data,
555 v8::Debug::ClientData* client_data);
556 void ProcessCompileEventInDebugScope(v8::DebugEvent event,
557 Handle<Script> script);
558 void ProcessDebugEvent(v8::DebugEvent event,
559 Handle<JSObject> event_data,
561 void NotifyMessageHandler(v8::DebugEvent event,
562 Handle<JSObject> exec_state,
563 Handle<JSObject> event_data,
565 void InvokeMessageHandler(MessageImpl message);
567 static bool CompileDebuggerScript(Isolate* isolate, int index);
569 void ActivateStepIn(StackFrame* frame);
571 void ActivateStepOut(StackFrame* frame);
572 void ClearStepNext();
573 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info);
574 void RemoveDebugInfo(DebugInfo** debug_info);
575 void RemoveDebugInfo(DebugInfoListNode* node);
576 void RemoveDebugInfo(DebugInfoListNode* prev, DebugInfoListNode* node);
577 Handle<Object> CheckBreakPoints(Handle<Object> break_point);
578 bool CheckBreakPoint(Handle<Object> break_point_object);
580 inline void AssertDebugContext() {
581 DCHECK(isolate_->context() == *debug_context());
582 DCHECK(in_debug_scope());
588 Handle<Context> debug_context_;
589 Handle<Object> event_listener_;
590 Handle<Object> event_listener_data_;
592 v8::Debug::MessageHandler message_handler_;
594 static const int kQueueInitialSize = 4;
595 base::Semaphore command_received_; // Signaled for each command received.
596 LockingCommandMessageQueue command_queue_;
597 LockingCommandMessageQueue event_command_queue_;
601 bool live_edit_enabled_;
602 bool has_break_points_;
603 bool break_disabled_;
604 bool in_debug_event_listener_;
605 bool break_on_exception_;
606 bool break_on_uncaught_exception_;
608 ScriptCache* script_cache_; // Cache of all scripts in the heap.
609 DebugInfoListNode* debug_info_list_; // List of active debug info objects.
611 // Storage location for jump when exiting debug break calls.
612 // Note that this address is not GC safe. It should be computed immediately
613 // before returning to the DebugBreakCallHelper.
614 Address after_break_target_;
619 // Top debugger entry.
620 base::AtomicWord current_debug_scope_;
622 // Counter for generating next break id.
628 // Frame id for the frame of the current break.
629 StackFrame::Id break_frame_id_;
631 // Step action for last step performed.
632 StepAction last_step_action_;
634 // Source statement position from last step next action.
635 int last_statement_position_;
637 // Number of steps left to perform before debug event.
640 // Frame pointer from last step next or step frame action.
643 // Number of queued steps left to perform before debug event.
644 int queued_step_count_;
646 // Frame pointer for frame from which step in was performed.
647 Address step_into_fp_;
649 // Frame pointer for the frame where debugger should be called when current
650 // step out action is completed.
651 Address step_out_fp_;
653 // Stores the way how LiveEdit has patched the stack. It is used when
654 // debugger returns control back to user script.
655 LiveEdit::FrameDropMode frame_drop_mode_;
657 // When restarter frame is on stack, stores the address
658 // of the pointer to function being restarted. Otherwise (most of the time)
659 // stores NULL. This pointer is used with 'step in' implementation.
660 Object** restarter_frame_function_pointer_;
663 // Storage location for registers when handling debug break calls
664 ThreadLocal thread_local_;
668 friend class Isolate;
669 friend class DebugScope;
670 friend class DisableBreak;
671 friend class LiveEdit;
672 friend class SuppressDebug;
674 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc
675 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc
677 DISALLOW_COPY_AND_ASSIGN(Debug);
681 DECLARE_RUNTIME_FUNCTION(Debug_Break);
684 // This scope is used to load and enter the debug context and create a new
685 // break state. Leaving the scope will restore the previous state.
686 // On failure to load, FailedToEnter returns true.
687 class DebugScope BASE_EMBEDDED {
689 explicit DebugScope(Debug* debug);
692 // Check whether loading was successful.
693 inline bool failed() { return failed_; }
695 // Get the active context from before entering the debugger.
696 inline Handle<Context> GetContext() { return save_.context(); }
699 Isolate* isolate() { return debug_->isolate_; }
702 DebugScope* prev_; // Previous scope if entered recursively.
703 StackFrame::Id break_frame_id_; // Previous break frame id.
704 int break_id_; // Previous break id.
705 bool failed_; // Did the debug context fail to load?
706 SaveContext save_; // Saves previous context.
707 PostponeInterruptsScope no_termination_exceptons_;
711 // Stack allocated class for disabling break.
712 class DisableBreak BASE_EMBEDDED {
714 explicit DisableBreak(Debug* debug, bool disable_break)
716 previous_break_disabled_(debug->break_disabled_),
717 previous_in_debug_event_listener_(debug->in_debug_event_listener_) {
718 debug_->break_disabled_ = disable_break;
719 debug_->in_debug_event_listener_ = disable_break;
722 debug_->break_disabled_ = previous_break_disabled_;
723 debug_->in_debug_event_listener_ = previous_in_debug_event_listener_;
728 bool previous_break_disabled_;
729 bool previous_in_debug_event_listener_;
730 DISALLOW_COPY_AND_ASSIGN(DisableBreak);
734 class SuppressDebug BASE_EMBEDDED {
736 explicit SuppressDebug(Debug* debug)
737 : debug_(debug), old_state_(debug->is_suppressed_) {
738 debug_->is_suppressed_ = true;
740 ~SuppressDebug() { debug_->is_suppressed_ = old_state_; }
745 DISALLOW_COPY_AND_ASSIGN(SuppressDebug);
749 // Code generator routines.
750 class DebugCodegen : public AllStatic {
752 static void GenerateSlot(MacroAssembler* masm);
753 static void GenerateCallICStubDebugBreak(MacroAssembler* masm);
754 static void GenerateLoadICDebugBreak(MacroAssembler* masm);
755 static void GenerateStoreICDebugBreak(MacroAssembler* masm);
756 static void GenerateKeyedLoadICDebugBreak(MacroAssembler* masm);
757 static void GenerateKeyedStoreICDebugBreak(MacroAssembler* masm);
758 static void GenerateCompareNilICDebugBreak(MacroAssembler* masm);
759 static void GenerateReturnDebugBreak(MacroAssembler* masm);
760 static void GenerateCallFunctionStubDebugBreak(MacroAssembler* masm);
761 static void GenerateCallConstructStubDebugBreak(MacroAssembler* masm);
762 static void GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm);
763 static void GenerateSlotDebugBreak(MacroAssembler* masm);
764 static void GeneratePlainReturnLiveEdit(MacroAssembler* masm);
766 // FrameDropper is a code replacement for a JavaScript frame with possibly
767 // several frames above.
768 // There is no calling conventions here, because it never actually gets
769 // called, it only gets returned to.
770 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm);
774 } } // namespace v8::internal
776 #endif // V8_DEBUG_H_