| 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/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/ast-expression-rewriter.h" | 9 #include "src/ast/ast-expression-rewriter.h" |
| 10 #include "src/ast/ast-expression-visitor.h" | 10 #include "src/ast/ast-expression-visitor.h" |
| (...skipping 2789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2800 Expression* is_undefined = factory()->NewCompareOperation( | 2800 Expression* is_undefined = factory()->NewCompareOperation( |
| 2801 Token::EQ_STRICT, assign, | 2801 Token::EQ_STRICT, assign, |
| 2802 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition), pos); | 2802 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition), pos); |
| 2803 | 2803 |
| 2804 // is_undefined ? this : is_object_conditional | 2804 // is_undefined ? this : is_object_conditional |
| 2805 return_value = factory()->NewConditional( | 2805 return_value = factory()->NewConditional( |
| 2806 is_undefined, ThisExpression(scope_, factory(), pos), | 2806 is_undefined, ThisExpression(scope_, factory(), pos), |
| 2807 is_object_conditional, pos); | 2807 is_object_conditional, pos); |
| 2808 } | 2808 } |
| 2809 | 2809 |
| 2810 return_value->MarkTail(); | 2810 // ES6 14.6.1 Static Semantics: IsInTailPosition |
| 2811 if (FLAG_harmony_tailcalls && !is_sloppy(language_mode())) { |
| 2812 return_value->MarkTail(); |
| 2813 } |
| 2811 } | 2814 } |
| 2812 ExpectSemicolon(CHECK_OK); | 2815 ExpectSemicolon(CHECK_OK); |
| 2813 | 2816 |
| 2814 if (is_generator()) { | 2817 if (is_generator()) { |
| 2815 Expression* generator = factory()->NewVariableProxy( | 2818 Expression* generator = factory()->NewVariableProxy( |
| 2816 function_state_->generator_object_variable()); | 2819 function_state_->generator_object_variable()); |
| 2817 Expression* yield = factory()->NewYield( | 2820 Expression* yield = factory()->NewYield( |
| 2818 generator, return_value, Yield::kFinal, loc.beg_pos); | 2821 generator, return_value, Yield::kFinal, loc.beg_pos); |
| 2819 result = factory()->NewExpressionStatement(yield, loc.beg_pos); | 2822 result = factory()->NewExpressionStatement(yield, loc.beg_pos); |
| 2820 } else { | 2823 } else { |
| (...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5733 auto class_literal = value->AsClassLiteral(); | 5736 auto class_literal = value->AsClassLiteral(); |
| 5734 if (class_literal->raw_name() == nullptr) { | 5737 if (class_literal->raw_name() == nullptr) { |
| 5735 class_literal->set_raw_name(name); | 5738 class_literal->set_raw_name(name); |
| 5736 } | 5739 } |
| 5737 } | 5740 } |
| 5738 } | 5741 } |
| 5739 | 5742 |
| 5740 | 5743 |
| 5741 } // namespace internal | 5744 } // namespace internal |
| 5742 } // namespace v8 | 5745 } // namespace v8 |
| OLD | NEW |