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

Side by Side Diff: src/parser.h

Issue 1431873006: Use a single Token::INIT for all variable initialization (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm, simplify fvar code Created 5 years, 1 month 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/parser.cc » ('j') | no next file with comments »
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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 enum Kind { NORMAL, PARAMETER }; 978 enum Kind { NORMAL, PARAMETER };
979 Parser* parser; 979 Parser* parser;
980 Scope* declaration_scope; 980 Scope* declaration_scope;
981 Scope* scope; 981 Scope* scope;
982 Scope* hoist_scope; 982 Scope* hoist_scope;
983 VariableMode mode; 983 VariableMode mode;
984 bool is_const; 984 bool is_const;
985 bool needs_init; 985 bool needs_init;
986 int declaration_pos; 986 int declaration_pos;
987 int initialization_pos; 987 int initialization_pos;
988 Token::Value init_op;
989 Kind declaration_kind; 988 Kind declaration_kind;
990 }; 989 };
991 990
992 struct DeclarationParsingResult { 991 struct DeclarationParsingResult {
993 struct Declaration { 992 struct Declaration {
994 Declaration(Expression* pattern, int initializer_position, 993 Declaration(Expression* pattern, int initializer_position,
995 Expression* initializer) 994 Expression* initializer)
996 : pattern(pattern), 995 : pattern(pattern),
997 initializer_position(initializer_position), 996 initializer_position(initializer_position),
998 initializer(initializer) {} 997 initializer(initializer) {}
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 1386
1388 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1387 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1389 return parser_->ParseDoExpression(ok); 1388 return parser_->ParseDoExpression(ok);
1390 } 1389 }
1391 1390
1392 1391
1393 } // namespace internal 1392 } // namespace internal
1394 } // namespace v8 1393 } // namespace v8
1395 1394
1396 #endif // V8_PARSER_H_ 1395 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698