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-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 SuperPropertyReference* super) { | 689 SuperPropertyReference* super) { |
690 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); | 690 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); |
691 } | 691 } |
692 | 692 |
693 | 693 |
694 void FullCodeGenerator::VisitSuperCallReference(SuperCallReference* super) { | 694 void FullCodeGenerator::VisitSuperCallReference(SuperCallReference* super) { |
695 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); | 695 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); |
696 } | 696 } |
697 | 697 |
698 | 698 |
699 void FullCodeGenerator::EmitGeneratorNext(CallRuntime* expr) { | |
700 ZoneList<Expression*>* args = expr->arguments(); | |
701 DCHECK(args->length() == 2); | |
702 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::NEXT); | |
703 } | |
704 | |
705 | |
706 void FullCodeGenerator::EmitGeneratorReturn(CallRuntime* expr) { | |
707 ZoneList<Expression*>* args = expr->arguments(); | |
708 DCHECK(args->length() == 2); | |
709 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::RETURN); | |
710 } | |
711 | |
712 | |
713 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) { | |
714 ZoneList<Expression*>* args = expr->arguments(); | |
715 DCHECK(args->length() == 2); | |
716 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); | |
717 } | |
718 | |
719 | |
720 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { | 699 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { |
721 context()->Plug(handle(Smi::FromInt(0), isolate())); | 700 context()->Plug(handle(Smi::FromInt(0), isolate())); |
722 } | 701 } |
723 | 702 |
724 | 703 |
725 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { | 704 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { |
726 switch (expr->op()) { | 705 switch (expr->op()) { |
727 case Token::COMMA: | 706 case Token::COMMA: |
728 return VisitComma(expr); | 707 return VisitComma(expr); |
729 case Token::OR: | 708 case Token::OR: |
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1937 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1959 var->initializer_position() >= proxy->position(); | 1938 var->initializer_position() >= proxy->position(); |
1960 } | 1939 } |
1961 | 1940 |
1962 | 1941 |
1963 #undef __ | 1942 #undef __ |
1964 | 1943 |
1965 | 1944 |
1966 } // namespace internal | 1945 } // namespace internal |
1967 } // namespace v8 | 1946 } // namespace v8 |
OLD | NEW |