| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index bad634cf3fd0e9fd02cc69eb93e5c27d7ee4d950..49a3194b17d8d9de1a4f7b5c5dc3309a8a05b413 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -473,7 +473,7 @@ void FullCodeGenerator::PrepareForBailoutForId(BailoutId id, State state) {
|
|
|
|
|
| void FullCodeGenerator::RecordTypeFeedbackCell(
|
| - TypeFeedbackId id, Handle<JSGlobalPropertyCell> cell) {
|
| + TypeFeedbackId id, Handle<Cell> cell) {
|
| TypeFeedbackCellEntry entry = { id, cell };
|
| type_feedback_cells_.Add(entry, zone());
|
| }
|
| @@ -1230,13 +1230,7 @@ void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
|
| }
|
|
|
|
|
| -void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
|
| - Comment cmnt(masm_, "[ ReturnStatement");
|
| - SetStatementPosition(stmt);
|
| - Expression* expr = stmt->expression();
|
| - VisitForAccumulatorValue(expr);
|
| -
|
| - // Exit all nested statements.
|
| +void FullCodeGenerator::EmitUnwindBeforeReturn() {
|
| NestedStatement* current = nesting_stack_;
|
| int stack_depth = 0;
|
| int context_length = 0;
|
| @@ -1244,7 +1238,15 @@ void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
|
| current = current->Exit(&stack_depth, &context_length);
|
| }
|
| __ Drop(stack_depth);
|
| +}
|
|
|
| +
|
| +void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
|
| + Comment cmnt(masm_, "[ ReturnStatement");
|
| + SetStatementPosition(stmt);
|
| + Expression* expr = stmt->expression();
|
| + VisitForAccumulatorValue(expr);
|
| + EmitUnwindBeforeReturn();
|
| EmitReturnSequence();
|
| }
|
|
|
|
|