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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 1744123003: [debugger] fix break locations for assignments and return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix .status Created 4 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
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 0af549ca266c36216362c248b7d63ae9cf2bff40..ae4404a035e570e176c535191472179696822acf 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -573,6 +573,8 @@ Handle<BytecodeArray> BytecodeGenerator::MakeBytecode(CompilationInfo* info) {
isolate(), zone(), info->num_parameters_including_this(),
scope()->MaxNestedContextChainLength(), scope()->num_stack_slots()));
+ builder()->InitializeReturnPosition(info->literal());
+
// Initialize the incoming context.
ContextScope incoming_context(this, scope(), false);
@@ -877,8 +879,8 @@ void BytecodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
void BytecodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
- VisitForAccumulatorValue(stmt->expression());
builder()->SetStatementPosition(stmt);
vogelheim 2016/02/29 17:43:30 Just for my understanding: These switched lines is
Yang 2016/02/29 17:53:12 Yes, correct.
+ VisitForAccumulatorValue(stmt->expression());
execution_control()->ReturnAccumulator();
}

Powered by Google App Engine
This is Rietveld 408576698