| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/api.h" | 10 #include "src/api.h" |
| (...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1892 Expression* Parser::BuildIteratorNextResult(Expression* iterator, | 1892 Expression* Parser::BuildIteratorNextResult(Expression* iterator, |
| 1893 Variable* result, IteratorType type, | 1893 Variable* result, IteratorType type, |
| 1894 int pos) { | 1894 int pos) { |
| 1895 Expression* next_literal = factory()->NewStringLiteral( | 1895 Expression* next_literal = factory()->NewStringLiteral( |
| 1896 ast_value_factory()->next_string(), kNoSourcePosition); | 1896 ast_value_factory()->next_string(), kNoSourcePosition); |
| 1897 Expression* next_property = | 1897 Expression* next_property = |
| 1898 factory()->NewProperty(iterator, next_literal, kNoSourcePosition); | 1898 factory()->NewProperty(iterator, next_literal, kNoSourcePosition); |
| 1899 ZoneList<Expression*>* next_arguments = | 1899 ZoneList<Expression*>* next_arguments = |
| 1900 new (zone()) ZoneList<Expression*>(0, zone()); | 1900 new (zone()) ZoneList<Expression*>(0, zone()); |
| 1901 Expression* next_call = | 1901 Expression* next_call = |
| 1902 factory()->NewCall(next_property, next_arguments, pos); | 1902 factory()->NewCall(next_property, next_arguments, kNoSourcePosition); |
| 1903 if (type == IteratorType::kAsync) { | 1903 if (type == IteratorType::kAsync) { |
| 1904 next_call = RewriteAwaitExpression(next_call, pos); | 1904 next_call = RewriteAwaitExpression(next_call, pos); |
| 1905 } | 1905 } |
| 1906 Expression* result_proxy = factory()->NewVariableProxy(result); | 1906 Expression* result_proxy = factory()->NewVariableProxy(result); |
| 1907 Expression* left = | 1907 Expression* left = |
| 1908 factory()->NewAssignment(Token::ASSIGN, result_proxy, next_call, pos); | 1908 factory()->NewAssignment(Token::ASSIGN, result_proxy, next_call, pos); |
| 1909 | 1909 |
| 1910 // %_IsJSReceiver(...) | 1910 // %_IsJSReceiver(...) |
| 1911 ZoneList<Expression*>* is_spec_object_args = | 1911 ZoneList<Expression*>* is_spec_object_args = |
| 1912 new (zone()) ZoneList<Expression*>(1, zone()); | 1912 new (zone()) ZoneList<Expression*>(1, zone()); |
| (...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5200 literal->SetShouldEagerCompile(); | 5200 literal->SetShouldEagerCompile(); |
| 5201 } | 5201 } |
| 5202 } | 5202 } |
| 5203 | 5203 |
| 5204 #undef CHECK_OK | 5204 #undef CHECK_OK |
| 5205 #undef CHECK_OK_VOID | 5205 #undef CHECK_OK_VOID |
| 5206 #undef CHECK_FAILED | 5206 #undef CHECK_FAILED |
| 5207 | 5207 |
| 5208 } // namespace internal | 5208 } // namespace internal |
| 5209 } // namespace v8 | 5209 } // namespace v8 |
| OLD | NEW |