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

Side by Side Diff: src/parser.h

Issue 1091743002: Simplify DoParseProgram (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Use peek location for scope end position 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1 877 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1
878 878
879 // Returns NULL if parsing failed. 879 // Returns NULL if parsing failed.
880 FunctionLiteral* ParseProgram(Isolate* isolate, ParseInfo* info); 880 FunctionLiteral* ParseProgram(Isolate* isolate, ParseInfo* info);
881 881
882 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info); 882 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info);
883 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info, 883 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info,
884 Utf16CharacterStream* source); 884 Utf16CharacterStream* source);
885 885
886 // Called by ParseProgram after setting up the scanner. 886 // Called by ParseProgram after setting up the scanner.
887 FunctionLiteral* DoParseProgram(ParseInfo* info, Scope** scope, 887 FunctionLiteral* DoParseProgram(ParseInfo* info);
888 Scope** ad_hoc_eval_scope);
889 888
890 void SetCachedData(ParseInfo* info); 889 void SetCachedData(ParseInfo* info);
891 890
892 bool inside_with() const { return scope_->inside_with(); } 891 bool inside_with() const { return scope_->inside_with(); }
893 ScriptCompiler::CompileOptions compile_options() const { 892 ScriptCompiler::CompileOptions compile_options() const {
894 return compile_options_; 893 return compile_options_;
895 } 894 }
896 bool consume_cached_parse_data() const { 895 bool consume_cached_parse_data() const {
897 return compile_options_ == ScriptCompiler::kConsumeParserCache && 896 return compile_options_ == ScriptCompiler::kConsumeParserCache &&
898 cached_parse_data_ != NULL; 897 cached_parse_data_ != NULL;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } 1172 }
1174 1173
1175 1174
1176 Expression* ParserTraits::SpreadCallNew( 1175 Expression* ParserTraits::SpreadCallNew(
1177 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { 1176 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) {
1178 return parser_->SpreadCallNew(function, args, pos); 1177 return parser_->SpreadCallNew(function, args, pos);
1179 } 1178 }
1180 } } // namespace v8::internal 1179 } } // namespace v8::internal
1181 1180
1182 #endif // V8_PARSER_H_ 1181 #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