| OLD | NEW |
| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 } | 623 } |
| 624 | 624 |
| 625 | 625 |
| 626 void FullCodeGenerator::EmitGeneratorNext(CallRuntime* expr) { | 626 void FullCodeGenerator::EmitGeneratorNext(CallRuntime* expr) { |
| 627 ZoneList<Expression*>* args = expr->arguments(); | 627 ZoneList<Expression*>* args = expr->arguments(); |
| 628 DCHECK(args->length() == 2); | 628 DCHECK(args->length() == 2); |
| 629 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::NEXT); | 629 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::NEXT); |
| 630 } | 630 } |
| 631 | 631 |
| 632 | 632 |
| 633 void FullCodeGenerator::EmitGeneratorReturn(CallRuntime* expr) { |
| 634 ZoneList<Expression*>* args = expr->arguments(); |
| 635 DCHECK(args->length() == 2); |
| 636 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::RETURN); |
| 637 } |
| 638 |
| 639 |
| 633 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) { | 640 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) { |
| 634 ZoneList<Expression*>* args = expr->arguments(); | 641 ZoneList<Expression*>* args = expr->arguments(); |
| 635 DCHECK(args->length() == 2); | 642 DCHECK(args->length() == 2); |
| 636 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); | 643 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); |
| 637 } | 644 } |
| 638 | 645 |
| 639 | 646 |
| 640 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { | 647 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { |
| 641 context()->Plug(handle(Smi::FromInt(0), isolate())); | 648 context()->Plug(handle(Smi::FromInt(0), isolate())); |
| 642 } | 649 } |
| (...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1737 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1731 var->initializer_position() >= proxy->position(); | 1738 var->initializer_position() >= proxy->position(); |
| 1732 } | 1739 } |
| 1733 | 1740 |
| 1734 | 1741 |
| 1735 #undef __ | 1742 #undef __ |
| 1736 | 1743 |
| 1737 | 1744 |
| 1738 } // namespace internal | 1745 } // namespace internal |
| 1739 } // namespace v8 | 1746 } // namespace v8 |
| OLD | NEW |