| 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_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
| 6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 bool legacy, bool* ok); | 931 bool legacy, bool* ok); |
| 932 | 932 |
| 933 // !%_IsJSReceiver(result = iterator.next()) && | 933 // !%_IsJSReceiver(result = iterator.next()) && |
| 934 // %ThrowIteratorResultNotAnObject(result) | 934 // %ThrowIteratorResultNotAnObject(result) |
| 935 Expression* BuildIteratorNextResult(Expression* iterator, Variable* result, | 935 Expression* BuildIteratorNextResult(Expression* iterator, Variable* result, |
| 936 int pos); | 936 int pos); |
| 937 | 937 |
| 938 | 938 |
| 939 // Initialize the components of a for-in / for-of statement. | 939 // Initialize the components of a for-in / for-of statement. |
| 940 void InitializeForEachStatement(ForEachStatement* stmt, Expression* each, | 940 void InitializeForEachStatement(ForEachStatement* stmt, Expression* each, |
| 941 Expression* subject, Statement* body, | 941 Expression* subject, Statement* body); |
| 942 bool is_destructuring); | 942 void InitializeForOfStatement(ForOfStatement* stmt, Expression* each, |
| 943 Expression* iterable, Statement* body, |
| 944 int iterable_pos); |
| 943 Statement* DesugarLexicalBindingsInForStatement( | 945 Statement* DesugarLexicalBindingsInForStatement( |
| 944 Scope* inner_scope, VariableMode mode, | 946 Scope* inner_scope, VariableMode mode, |
| 945 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, | 947 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, |
| 946 Expression* cond, Statement* next, Statement* body, bool* ok); | 948 Expression* cond, Statement* next, Statement* body, bool* ok); |
| 947 | 949 |
| 948 void RewriteDoExpression(Expression* expr, bool* ok); | 950 void RewriteDoExpression(Expression* expr, bool* ok); |
| 949 | 951 |
| 950 FunctionLiteral* ParseFunctionLiteral( | 952 FunctionLiteral* ParseFunctionLiteral( |
| 951 const AstRawString* name, Scanner::Location function_name_location, | 953 const AstRawString* name, Scanner::Location function_name_location, |
| 952 FunctionNameValidity function_name_validity, FunctionKind kind, | 954 FunctionNameValidity function_name_validity, FunctionKind kind, |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 | 1240 |
| 1239 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1241 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1240 return parser_->ParseDoExpression(ok); | 1242 return parser_->ParseDoExpression(ok); |
| 1241 } | 1243 } |
| 1242 | 1244 |
| 1243 | 1245 |
| 1244 } // namespace internal | 1246 } // namespace internal |
| 1245 } // namespace v8 | 1247 } // namespace v8 |
| 1246 | 1248 |
| 1247 #endif // V8_PARSING_PARSER_H_ | 1249 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |