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

Unified Diff: src/full-codegen.cc

Issue 1222093007: Debugger: use debug break slot to break on call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased and addressed comments Created 5 years, 5 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/full-codegen.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 8ca40ccacd568033cee8b9cafd8a56a055ed0485..5cc4881549144433b40794db177012d084a32c7b 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -433,6 +433,7 @@ void FullCodeGenerator::SetStatementPosition(
bool recorded = RecordStatementPosition(masm_, stmt->position());
if (recorded && insert_break == INSERT_BREAK && info_->is_debug() &&
!stmt->IsDebuggerStatement()) {
+ masm_->RecordDebugBreakSlot();
DebugCodegen::GenerateSlot(masm_);
}
}
@@ -443,6 +444,7 @@ void FullCodeGenerator::SetExpressionPosition(
if (expr->position() == RelocInfo::kNoPosition) return;
bool recorded = RecordPosition(masm_, expr->position());
if (recorded && insert_break == INSERT_BREAK && info_->is_debug()) {
+ masm_->RecordDebugBreakSlot();
DebugCodegen::GenerateSlot(masm_);
}
}
@@ -451,7 +453,32 @@ void FullCodeGenerator::SetExpressionPosition(
void FullCodeGenerator::SetExpressionAsStatementPosition(Expression* expr) {
if (expr->position() == RelocInfo::kNoPosition) return;
bool recorded = RecordStatementPosition(masm_, expr->position());
- if (recorded && info_->is_debug()) DebugCodegen::GenerateSlot(masm_);
+ if (recorded && info_->is_debug()) {
+ masm_->RecordDebugBreakSlot();
+ DebugCodegen::GenerateSlot(masm_);
+ }
+}
+
+
+void FullCodeGenerator::SetCallPosition(Expression* expr, int argc) {
+ if (expr->position() == RelocInfo::kNoPosition) return;
+ RecordPosition(masm_, expr->position());
+ if (info_->is_debug()) {
+ // Always emit a debug break slot before a call.
+ masm_->RecordDebugBreakSlotForCall(argc);
+ DebugCodegen::GenerateSlot(masm_);
+ }
+}
+
+
+void FullCodeGenerator::SetConstructCallPosition(Expression* expr) {
+ if (expr->position() == RelocInfo::kNoPosition) return;
+ RecordPosition(masm_, expr->position());
+ if (info_->is_debug()) {
+ // Always emit a debug break slot before a construct call.
+ masm_->RecordDebugBreakSlotForConstructCall();
+ DebugCodegen::GenerateSlot(masm_);
+ }
}
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698