Chromium Code Reviews| 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(); |
| } |