Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: src/parsing/parser.h

Issue 1564083002: Add spread rewriting (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase to remove things added in separate CLs Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 Expression* SpreadCall(Expression* function, 1001 Expression* SpreadCall(Expression* function,
1002 ZoneList<v8::internal::Expression*>* args, int pos); 1002 ZoneList<v8::internal::Expression*>* args, int pos);
1003 Expression* SpreadCallNew(Expression* function, 1003 Expression* SpreadCallNew(Expression* function,
1004 ZoneList<v8::internal::Expression*>* args, int pos); 1004 ZoneList<v8::internal::Expression*>* args, int pos);
1005 1005
1006 void SetLanguageMode(Scope* scope, LanguageMode mode); 1006 void SetLanguageMode(Scope* scope, LanguageMode mode);
1007 void RaiseLanguageMode(LanguageMode mode); 1007 void RaiseLanguageMode(LanguageMode mode);
1008 1008
1009 V8_INLINE void RewriteDestructuringAssignments(); 1009 V8_INLINE void RewriteDestructuringAssignments();
1010 1010
1011 friend class SpreadRewriter;
1012 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit);
1013
1011 V8_INLINE Expression* RewriteExpression(Expression* expr); 1014 V8_INLINE Expression* RewriteExpression(Expression* expr);
1012 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty( 1015 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty(
1013 ObjectLiteralProperty* property); 1016 ObjectLiteralProperty* property);
1014 1017
1015 friend class InitializerRewriter; 1018 friend class InitializerRewriter;
1016 void RewriteParameterInitializer(Expression* expr, Scope* scope); 1019 void RewriteParameterInitializer(Expression* expr, Scope* scope);
1017 1020
1018 Scanner scanner_; 1021 Scanner scanner_;
1019 PreParser* reusable_preparser_; 1022 PreParser* reusable_preparser_;
1020 Scope* original_scope_; // for ES5 function declarations in sloppy eval 1023 Scope* original_scope_; // for ES5 function declarations in sloppy eval
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1204
1202 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1205 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1203 return parser_->ParseDoExpression(ok); 1206 return parser_->ParseDoExpression(ok);
1204 } 1207 }
1205 1208
1206 1209
1207 } // namespace internal 1210 } // namespace internal
1208 } // namespace v8 1211 } // namespace v8
1209 1212
1210 #endif // V8_PARSING_PARSER_H_ 1213 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698