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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 1606273002: Implement [Generator].prototype.return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Port changes to other architectures. Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 628 }
629 629
630 630
631 void FullCodeGenerator::EmitGeneratorNext(CallRuntime* expr) { 631 void FullCodeGenerator::EmitGeneratorNext(CallRuntime* expr) {
632 ZoneList<Expression*>* args = expr->arguments(); 632 ZoneList<Expression*>* args = expr->arguments();
633 DCHECK(args->length() == 2); 633 DCHECK(args->length() == 2);
634 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::NEXT); 634 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::NEXT);
635 } 635 }
636 636
637 637
638 void FullCodeGenerator::EmitGeneratorReturn(CallRuntime* expr) {
639 ZoneList<Expression*>* args = expr->arguments();
640 DCHECK(args->length() == 2);
641 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::RETURN);
642 }
643
644
638 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) { 645 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) {
639 ZoneList<Expression*>* args = expr->arguments(); 646 ZoneList<Expression*>* args = expr->arguments();
640 DCHECK(args->length() == 2); 647 DCHECK(args->length() == 2);
641 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); 648 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW);
642 } 649 }
643 650
644 651
645 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { 652 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) {
646 context()->Plug(handle(Smi::FromInt(0), isolate())); 653 context()->Plug(handle(Smi::FromInt(0), isolate()));
647 } 654 }
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1742 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1736 var->initializer_position() >= proxy->position(); 1743 var->initializer_position() >= proxy->position();
1737 } 1744 }
1738 1745
1739 1746
1740 #undef __ 1747 #undef __
1741 1748
1742 1749
1743 } // namespace internal 1750 } // namespace internal
1744 } // namespace v8 1751 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698