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

Side by Side Diff: src/parser.h

Issue 1104223002: [es6] implement optional parameters via desugaring (with scoping) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Finalize function body scope if it's not needed Created 5 years, 7 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
« no previous file with comments | « src/globals.h ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 970
971 // Initialize the components of a for-in / for-of statement. 971 // Initialize the components of a for-in / for-of statement.
972 void InitializeForEachStatement(ForEachStatement* stmt, 972 void InitializeForEachStatement(ForEachStatement* stmt,
973 Expression* each, 973 Expression* each,
974 Expression* subject, 974 Expression* subject,
975 Statement* body); 975 Statement* body);
976 Statement* DesugarLexicalBindingsInForStatement( 976 Statement* DesugarLexicalBindingsInForStatement(
977 Scope* inner_scope, bool is_const, ZoneList<const AstRawString*>* names, 977 Scope* inner_scope, bool is_const, ZoneList<const AstRawString*>* names,
978 ForStatement* loop, Statement* init, Expression* cond, Statement* next, 978 ForStatement* loop, Statement* init, Expression* cond, Statement* next,
979 Statement* body, bool* ok); 979 Statement* body, bool* ok);
980 980 ZoneList<Statement*>* DesugarInitializeParameters(
981 Scope* scope, bool has_initializers, ZoneList<Expression*>* initializers);
981 FunctionLiteral* ParseFunctionLiteral( 982 FunctionLiteral* ParseFunctionLiteral(
982 const AstRawString* name, Scanner::Location function_name_location, 983 const AstRawString* name, Scanner::Location function_name_location,
983 bool name_is_strict_reserved, FunctionKind kind, 984 bool name_is_strict_reserved, FunctionKind kind,
984 int function_token_position, FunctionLiteral::FunctionType type, 985 int function_token_position, FunctionLiteral::FunctionType type,
985 FunctionLiteral::ArityRestriction arity_restriction, bool* ok); 986 FunctionLiteral::ArityRestriction arity_restriction, bool* ok);
986 987
987 988
988 ClassLiteral* ParseClassLiteral(const AstRawString* name, 989 ClassLiteral* ParseClassLiteral(const AstRawString* name,
989 Scanner::Location class_name_location, 990 Scanner::Location class_name_location,
990 bool name_is_strict_reserved, int pos, 991 bool name_is_strict_reserved, int pos,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } 1174 }
1174 1175
1175 1176
1176 Expression* ParserTraits::SpreadCallNew( 1177 Expression* ParserTraits::SpreadCallNew(
1177 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { 1178 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) {
1178 return parser_->SpreadCallNew(function, args, pos); 1179 return parser_->SpreadCallNew(function, args, pos);
1179 } 1180 }
1180 } } // namespace v8::internal 1181 } } // namespace v8::internal
1181 1182
1182 #endif // V8_PARSER_H_ 1183 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698