| OLD | NEW |
| 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/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/parsing/parser-base.h" | 10 #include "src/parsing/parser-base.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 // Called by ParseProgram after setting up the scanner. | 241 // Called by ParseProgram after setting up the scanner. |
| 242 FunctionLiteral* DoParseProgram(ParseInfo* info); | 242 FunctionLiteral* DoParseProgram(ParseInfo* info); |
| 243 | 243 |
| 244 void SetCachedData(ParseInfo* info); | 244 void SetCachedData(ParseInfo* info); |
| 245 | 245 |
| 246 ScriptCompiler::CompileOptions compile_options() const { | 246 ScriptCompiler::CompileOptions compile_options() const { |
| 247 return compile_options_; | 247 return compile_options_; |
| 248 } | 248 } |
| 249 bool consume_cached_parse_data() const { | 249 bool consume_cached_parse_data() const { |
| 250 return compile_options_ == ScriptCompiler::kConsumeParserCache && | 250 return allow_lazy() && |
| 251 cached_parse_data_ != NULL; | 251 compile_options_ == ScriptCompiler::kConsumeParserCache; |
| 252 } | 252 } |
| 253 bool produce_cached_parse_data() const { | 253 bool produce_cached_parse_data() const { |
| 254 return compile_options_ == ScriptCompiler::kProduceParserCache; | 254 return allow_lazy() && |
| 255 compile_options_ == ScriptCompiler::kProduceParserCache; |
| 255 } | 256 } |
| 256 | 257 |
| 257 void ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); | 258 void ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); |
| 258 Statement* ParseModuleItem(bool* ok); | 259 Statement* ParseModuleItem(bool* ok); |
| 259 const AstRawString* ParseModuleSpecifier(bool* ok); | 260 const AstRawString* ParseModuleSpecifier(bool* ok); |
| 260 void ParseImportDeclaration(bool* ok); | 261 void ParseImportDeclaration(bool* ok); |
| 261 Statement* ParseExportDeclaration(bool* ok); | 262 Statement* ParseExportDeclaration(bool* ok); |
| 262 Statement* ParseExportDefault(bool* ok); | 263 Statement* ParseExportDefault(bool* ok); |
| 263 void ParseExportClause(ZoneList<const AstRawString*>* export_names, | 264 void ParseExportClause(ZoneList<const AstRawString*>* export_names, |
| 264 ZoneList<Scanner::Location>* export_locations, | 265 ZoneList<Scanner::Location>* export_locations, |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 int total_preparse_skipped_; | 1098 int total_preparse_skipped_; |
| 1098 HistogramTimer* pre_parse_timer_; | 1099 HistogramTimer* pre_parse_timer_; |
| 1099 | 1100 |
| 1100 bool parsing_on_main_thread_; | 1101 bool parsing_on_main_thread_; |
| 1101 }; | 1102 }; |
| 1102 | 1103 |
| 1103 } // namespace internal | 1104 } // namespace internal |
| 1104 } // namespace v8 | 1105 } // namespace v8 |
| 1105 | 1106 |
| 1106 #endif // V8_PARSING_PARSER_H_ | 1107 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |