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

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: fixes and addressed comments 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/parsing/pattern-rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 0af549ca266c36216362c248b7d63ae9cf2bff40..5aa739ff457515075514020bebae08035c7c8586 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -571,7 +571,8 @@ Handle<BytecodeArray> BytecodeGenerator::MakeBytecode(CompilationInfo* info) {
// Initialize bytecode array builder.
set_builder(new (zone()) BytecodeArrayBuilder(
isolate(), zone(), info->num_parameters_including_this(),
- scope()->MaxNestedContextChainLength(), scope()->num_stack_slots()));
+ scope()->MaxNestedContextChainLength(), scope()->num_stack_slots(),
+ info->literal()));
// Initialize the incoming context.
ContextScope incoming_context(this, scope(), false);
@@ -590,7 +591,7 @@ Handle<BytecodeArray> BytecodeGenerator::MakeBytecode(CompilationInfo* info) {
MakeBytecodeBody();
}
- builder()->EnsureReturn(info->literal());
+ builder()->EnsureReturn();
set_scope(nullptr);
set_info(nullptr);
return builder()->ToBytecodeArray();
@@ -877,8 +878,8 @@ void BytecodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
void BytecodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
- VisitForAccumulatorValue(stmt->expression());
builder()->SetStatementPosition(stmt);
+ VisitForAccumulatorValue(stmt->expression());
execution_control()->ReturnAccumulator();
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/parsing/pattern-rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698