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

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: fix build 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/interpreter/bytecodes.h » ('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 022f41efa54ca550a3ffc6bd0c1d8c4e3e6d5294..859904ab78895340b02c3686cb9137604ab306ea 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();
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698