| 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 #ifndef V8_PARSING_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
| 6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/parsing/parser-base.h" | 10 #include "src/parsing/parser-base.h" |
| (...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 V8_INLINE PreParserStatement CreateForEachStatementTDZ( | 1329 V8_INLINE PreParserStatement CreateForEachStatementTDZ( |
| 1330 PreParserStatement init_block, const ForInfo& for_info, bool* ok) { | 1330 PreParserStatement init_block, const ForInfo& for_info, bool* ok) { |
| 1331 return init_block; | 1331 return init_block; |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 V8_INLINE StatementT DesugarLexicalBindingsInForStatement( | 1334 V8_INLINE StatementT DesugarLexicalBindingsInForStatement( |
| 1335 PreParserStatement loop, PreParserStatement init, | 1335 PreParserStatement loop, PreParserStatement init, |
| 1336 PreParserExpression cond, PreParserStatement next, | 1336 PreParserExpression cond, PreParserStatement next, |
| 1337 PreParserStatement body, Scope* inner_scope, const ForInfo& for_info, | 1337 PreParserStatement body, Scope* inner_scope, const ForInfo& for_info, |
| 1338 bool* ok) { | 1338 bool* ok) { |
| 1339 // See Parser::DesugarLexicalBindingsInForStatement. |
| 1340 for (int i = 0; i < for_info.bound_names.length(); i++) { |
| 1341 inner_scope->DeclareVariableName(for_info.bound_names[i], |
| 1342 for_info.parsing_result.descriptor.mode); |
| 1343 } |
| 1339 return loop; | 1344 return loop; |
| 1340 } | 1345 } |
| 1341 | 1346 |
| 1342 V8_INLINE PreParserStatement BuildParameterInitializationBlock( | 1347 V8_INLINE PreParserStatement BuildParameterInitializationBlock( |
| 1343 const PreParserFormalParameters& parameters, bool* ok) { | 1348 const PreParserFormalParameters& parameters, bool* ok) { |
| 1344 return PreParserStatement::Default(); | 1349 return PreParserStatement::Default(); |
| 1345 } | 1350 } |
| 1346 | 1351 |
| 1347 V8_INLINE PreParserStatement | 1352 V8_INLINE PreParserStatement |
| 1348 BuildRejectPromiseOnException(PreParserStatement init_block) { | 1353 BuildRejectPromiseOnException(PreParserStatement init_block) { |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 function_state_->NextMaterializedLiteralIndex(); | 1663 function_state_->NextMaterializedLiteralIndex(); |
| 1659 function_state_->NextMaterializedLiteralIndex(); | 1664 function_state_->NextMaterializedLiteralIndex(); |
| 1660 } | 1665 } |
| 1661 return EmptyExpression(); | 1666 return EmptyExpression(); |
| 1662 } | 1667 } |
| 1663 | 1668 |
| 1664 } // namespace internal | 1669 } // namespace internal |
| 1665 } // namespace v8 | 1670 } // namespace v8 |
| 1666 | 1671 |
| 1667 #endif // V8_PARSING_PREPARSER_H | 1672 #endif // V8_PARSING_PREPARSER_H |
| OLD | NEW |