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

Unified Diff: src/debug/debug.cc

Issue 2672823007: Revert of [debugger] remove debugger statement support from FCG/CS. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index b701cb0c5d81c8a354d7bdbf8bfaad63dfbeb5f0..33f0834f2e06ebaebd7ee2b6da1fe90c10111440 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -186,6 +186,7 @@
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_CALL);
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL);
mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_POSITION);
+ mask |= RelocInfo::ModeMask(RelocInfo::DEBUGGER_STATEMENT);
return mask;
}
@@ -210,7 +211,8 @@
source_position_iterator_.Advance();
}
- DCHECK(RelocInfo::IsDebugBreakSlot(rmode()));
+ DCHECK(RelocInfo::IsDebugBreakSlot(rmode()) ||
+ RelocInfo::IsDebuggerStatement(rmode()));
break_index_++;
}
@@ -223,6 +225,8 @@
return isolate()->is_tail_call_elimination_enabled()
? DEBUG_BREAK_SLOT_AT_TAIL_CALL
: DEBUG_BREAK_SLOT_AT_CALL;
+ } else if (RelocInfo::IsDebuggerStatement(rmode())) {
+ return DEBUGGER_STATEMENT;
} else if (RelocInfo::IsDebugBreakSlot(rmode())) {
return DEBUG_BREAK_SLOT;
} else {
@@ -238,6 +242,7 @@
void CodeBreakIterator::SetDebugBreak() {
DebugBreakType debug_break_type = GetDebugBreakType();
+ if (debug_break_type == DEBUGGER_STATEMENT) return;
DCHECK(debug_break_type >= DEBUG_BREAK_SLOT);
Builtins* builtins = isolate()->builtins();
Handle<Code> target = debug_break_type == DEBUG_BREAK_SLOT_AT_RETURN
@@ -247,12 +252,16 @@
}
void CodeBreakIterator::ClearDebugBreak() {
- DCHECK(GetDebugBreakType() >= DEBUG_BREAK_SLOT);
+ DebugBreakType debug_break_type = GetDebugBreakType();
+ if (debug_break_type == DEBUGGER_STATEMENT) return;
+ DCHECK(debug_break_type >= DEBUG_BREAK_SLOT);
DebugCodegen::ClearDebugBreakSlot(isolate(), rinfo()->pc());
}
bool CodeBreakIterator::IsDebugBreak() {
- DCHECK(GetDebugBreakType() >= DEBUG_BREAK_SLOT);
+ DebugBreakType debug_break_type = GetDebugBreakType();
+ if (debug_break_type == DEBUGGER_STATEMENT) return false;
+ DCHECK(debug_break_type >= DEBUG_BREAK_SLOT);
return DebugCodegen::DebugBreakSlotIsPatched(rinfo()->pc());
}
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698