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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 bool* ok) { | 1097 bool* ok) { |
1098 return PreParserStatement::Default(); | 1098 return PreParserStatement::Default(); |
1099 } | 1099 } |
1100 V8_INLINE PreParserStatement LookupContinueTarget(PreParserIdentifier label, | 1100 V8_INLINE PreParserStatement LookupContinueTarget(PreParserIdentifier label, |
1101 bool* ok) { | 1101 bool* ok) { |
1102 return PreParserStatement::Default(); | 1102 return PreParserStatement::Default(); |
1103 } | 1103 } |
1104 | 1104 |
1105 V8_INLINE PreParserStatement DeclareFunction( | 1105 V8_INLINE PreParserStatement DeclareFunction( |
1106 PreParserIdentifier variable_name, PreParserExpression function, | 1106 PreParserIdentifier variable_name, PreParserExpression function, |
1107 VariableMode mode, int pos, bool is_generator, bool is_async, | 1107 VariableMode mode, int pos, bool is_sloppy_block_function, |
1108 bool is_sloppy_block_function, ZoneList<const AstRawString*>* names, | 1108 ZoneList<const AstRawString*>* names, bool* ok) { |
1109 bool* ok) { | |
1110 DCHECK_NULL(names); | 1109 DCHECK_NULL(names); |
1111 if (variable_name.string_ != nullptr) { | 1110 if (variable_name.string_ != nullptr) { |
1112 DCHECK(track_unresolved_variables_); | 1111 DCHECK(track_unresolved_variables_); |
1113 scope()->DeclareVariableName(variable_name.string_, mode); | 1112 scope()->DeclareVariableName(variable_name.string_, mode); |
1114 if (is_sloppy_block_function) { | 1113 if (is_sloppy_block_function) { |
1115 GetDeclarationScope()->DeclareSloppyBlockFunction(variable_name.string_, | 1114 GetDeclarationScope()->DeclareSloppyBlockFunction(variable_name.string_, |
1116 scope()); | 1115 scope()); |
1117 } | 1116 } |
1118 } | 1117 } |
1119 return Statement::Default(); | 1118 return Statement::Default(); |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 function_state_->NextMaterializedLiteralIndex(); | 1680 function_state_->NextMaterializedLiteralIndex(); |
1682 function_state_->NextMaterializedLiteralIndex(); | 1681 function_state_->NextMaterializedLiteralIndex(); |
1683 } | 1682 } |
1684 return EmptyExpression(); | 1683 return EmptyExpression(); |
1685 } | 1684 } |
1686 | 1685 |
1687 } // namespace internal | 1686 } // namespace internal |
1688 } // namespace v8 | 1687 } // namespace v8 |
1689 | 1688 |
1690 #endif // V8_PARSING_PREPARSER_H | 1689 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |