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

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

Issue 1682853004: [interpreter, debugger] implement bytecode break location iterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: small fix 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 4163d0786c195317b5685a0e653ec1a290bb50dc..d43193aa6ae90b35581775da436ac6d21a2dcdf0 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -574,6 +574,7 @@ Handle<BytecodeArray> BytecodeGenerator::MakeBytecode(CompilationInfo* info) {
MakeBytecodeBody();
}
+ builder()->EnsureReturn(info->literal());
set_scope(nullptr);
set_info(nullptr);
return builder()->ToBytecodeArray();
@@ -805,6 +806,7 @@ void BytecodeGenerator::VisitStatements(ZoneList<Statement*>* statements) {
void BytecodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) {
+ builder()->SetStatementPosition(stmt);
VisitForEffect(stmt->expression());
}
@@ -860,6 +862,7 @@ void BytecodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
void BytecodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
VisitForAccumulatorValue(stmt->expression());
+ builder()->SetReturnPosition(info_->literal());
execution_control()->ReturnAccumulator();
}
@@ -1215,6 +1218,7 @@ void BytecodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) {
void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) {
+ builder()->SetStatementPosition(stmt);
builder()->Debugger();
}

Powered by Google App Engine
This is Rietveld 408576698