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

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

Issue 1406983010: [Interpreter] Ensure ToBoolean bytecodes are correctly emitted at the start of basic blocks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments. Created 5 years, 1 month 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') | test/cctest/interpreter/test-bytecode-generator.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 22195c1d6679c0b57568e1f50148eb501fbaeec7..fdc61d2f3c1cad5cd2ae359654ba295f079b8158 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -374,7 +374,6 @@ void BytecodeGenerator::MakeBytecodeBody() {
void BytecodeGenerator::VisitBlock(Block* stmt) {
- builder()->EnterBlock();
if (stmt->scope() == NULL) {
// Visit statements in the same scope, no declarations.
VisitStatements(stmt->statements());
@@ -390,7 +389,6 @@ void BytecodeGenerator::VisitBlock(Block* stmt) {
VisitStatements(stmt->statements());
}
}
- builder()->LeaveBlock();
}
@@ -782,7 +780,6 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
ControlScopeForIteration control_scope(this, stmt, &loop_builder);
// Prepare the state for executing ForIn.
- builder()->EnterBlock();
VisitForAccumulatorValue(stmt->subject());
loop_builder.BreakIfUndefined();
loop_builder.BreakIfNull();
@@ -828,8 +825,8 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
.CountOperation(Token::Value::ADD, language_mode_strength())
.Jump(&condition_label);
- // End of loop
- builder()->Bind(&break_label).LeaveBlock();
+ // End of the loop.
+ builder()->Bind(&break_label);
loop_builder.SetBreakTarget(break_label);
loop_builder.SetContinueTarget(continue_label);
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698