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

Side by Side Diff: src/parser.h

Issue 1082013003: Revert of Eagerly declare eval scopes, even for sloppy scopes (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 } 903 }
904 Scope* DeclarationScope(VariableMode mode) { 904 Scope* DeclarationScope(VariableMode mode) {
905 return IsLexicalVariableMode(mode) 905 return IsLexicalVariableMode(mode)
906 ? scope_ : scope_->DeclarationScope(); 906 ? scope_ : scope_->DeclarationScope();
907 } 907 }
908 908
909 // All ParseXXX functions take as the last argument an *ok parameter 909 // All ParseXXX functions take as the last argument an *ok parameter
910 // which is set to false if parsing failed; it is unchanged otherwise. 910 // which is set to false if parsing failed; it is unchanged otherwise.
911 // By making the 'exception handling' explicit, we are forced to check 911 // By making the 'exception handling' explicit, we are forced to check
912 // for failure at the call sites. 912 // for failure at the call sites.
913 void* ParseStatementList(ZoneList<Statement*>* body, int end_token, bool* ok); 913 void* ParseStatementList(ZoneList<Statement*>* body, int end_token,
914 bool is_eval, Scope** ad_hoc_eval_scope, bool* ok);
914 Statement* ParseStatementListItem(bool* ok); 915 Statement* ParseStatementListItem(bool* ok);
915 void* ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); 916 void* ParseModuleItemList(ZoneList<Statement*>* body, bool* ok);
916 Statement* ParseModuleItem(bool* ok); 917 Statement* ParseModuleItem(bool* ok);
917 const AstRawString* ParseModuleSpecifier(bool* ok); 918 const AstRawString* ParseModuleSpecifier(bool* ok);
918 Statement* ParseImportDeclaration(bool* ok); 919 Statement* ParseImportDeclaration(bool* ok);
919 Statement* ParseExportDeclaration(bool* ok); 920 Statement* ParseExportDeclaration(bool* ok);
920 Statement* ParseExportDefault(bool* ok); 921 Statement* ParseExportDefault(bool* ok);
921 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, 922 void* ParseExportClause(ZoneList<const AstRawString*>* export_names,
922 ZoneList<Scanner::Location>* export_locations, 923 ZoneList<Scanner::Location>* export_locations,
923 ZoneList<const AstRawString*>* local_names, 924 ZoneList<const AstRawString*>* local_names,
(...skipping 249 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 | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698