Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: src/debug/debug.h

Issue 2636913002: [liveedit] reimplement frame restarting. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/debug/debug.h
diff --git a/src/debug/debug.h b/src/debug/debug.h
index b3bb3c46a64cfa2d673f69c4bac9b6dc5809aaeb..4d41f69112d229f2fbf097da4741f9299a7c2bbe 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -426,7 +426,6 @@ class Debug {
// Internal logic
bool Load();
void Break(JavaScriptFrame* frame);
- void SetAfterBreakTarget(JavaScriptFrame* frame);
// Scripts handling.
Handle<FixedArray> GetLoadedScripts();
@@ -494,8 +493,7 @@ class Debug {
bool IsBreakAtReturn(JavaScriptFrame* frame);
// Support for LiveEdit
- void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
- LiveEditFrameDropMode mode);
+ void UpdateBreakFrameId();
// Threading support.
char* ArchiveDebug(char* to);
@@ -538,10 +536,8 @@ class Debug {
StackFrame::Id break_frame_id() { return thread_local_.break_frame_id_; }
int break_id() { return thread_local_.break_id_; }
- Handle<Object> return_value() { return thread_local_.return_value_; }
- void set_return_value(Handle<Object> value) {
- thread_local_.return_value_ = value;
- }
+ Object* return_value() { return thread_local_.return_value_; }
+ void set_return_value(Object* value) { thread_local_.return_value_ = value; }
// Support for embedding into generated code.
Address is_active_address() {
@@ -552,10 +548,6 @@ class Debug {
return reinterpret_cast<Address>(&hook_on_function_call_);
}
- Address after_break_target_address() {
- return reinterpret_cast<Address>(&after_break_target_);
- }
-
Address last_step_action_address() {
return reinterpret_cast<Address>(&thread_local_.last_step_action_);
}
@@ -564,6 +556,15 @@ class Debug {
return reinterpret_cast<Address>(&thread_local_.suspended_generator_);
}
+ Address new_fp_address() {
+ return reinterpret_cast<Address>(&thread_local_.new_fp_);
+ }
+
+ void DropToFP(Address fp) {
+ // Drop to a lower a frame.
jgruber 2017/01/17 13:29:58 Nit: 'a lower a'. A diagram or brief description
Yang 2017/01/18 07:49:08 Done. Added comment.
+ if (fp > thread_local_.new_fp_) thread_local_.new_fp_ = fp;
+ }
+
StepAction last_step_action() { return thread_local_.last_step_action_; }
DebugFeatureTracker* feature_tracker() { return &feature_tracker_; }
@@ -697,11 +698,6 @@ class Debug {
// List of active debug info objects.
DebugInfoListNode* debug_info_list_;
- // Storage location for jump when exiting debug break calls.
- // Note that this address is not GC safe. It should be computed immediately
- // before returning to the DebugBreakCallHelper.
- Address after_break_target_;
-
// Used to collect histogram data on debugger feature usage.
DebugFeatureTracker feature_tracker_;
@@ -738,10 +734,14 @@ class Debug {
// Value of accumulator in interpreter frames. In non-interpreter frames
// this value will be the hole.
jgruber 2017/01/17 13:29:58 Is the comment about the hole still valid?
Yang 2017/01/18 07:49:07 Done.
- Handle<Object> return_value_;
+ Object* return_value_;
+ // The suspended generator object to track when stepping.
Object* suspended_generator_;
+ // The new frame pointer to drop to when restarting a frame.
+ Address new_fp_;
jgruber 2017/01/17 13:29:58 Nit: 'new_fp_' isn't very descriptive, maybe somet
Yang 2017/01/18 07:49:08 renamed to restart_fp_
+
int async_task_count_;
};
@@ -858,15 +858,10 @@ class DebugCodegen : public AllStatic {
static void GenerateDebugBreakStub(MacroAssembler* masm,
DebugBreakCallHelperMode mode);
- // FrameDropper is a code replacement for a JavaScript frame with possibly
- // several frames above.
- // There is no calling conventions here, because it never actually gets
- // called, it only gets returned to.
- static void GenerateFrameDropperLiveEdit(MacroAssembler* masm);
-
-
static void GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode);
+ static void GenerateFrameDropperTrampoline(MacroAssembler* masm);
+
static void PatchDebugBreakSlot(Isolate* isolate, Address pc,
Handle<Code> code);
static bool DebugBreakSlotIsPatched(Address pc);
« no previous file with comments | « src/code-factory.cc ('k') | src/debug/debug.cc » ('j') | src/debug/liveedit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698