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

Side by Side Diff: src/parser.h

Issue 960543002: Move compilation error handling into a separate class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « BUILD.gn ('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" // For CachedDataMode 10 #include "src/compiler.h" // For CachedDataMode
11 #include "src/pending-compilation-error-handler.h"
11 #include "src/preparse-data.h" 12 #include "src/preparse-data.h"
12 #include "src/preparse-data-format.h" 13 #include "src/preparse-data-format.h"
13 #include "src/preparser.h" 14 #include "src/preparser.h"
14 #include "src/scopes.h" 15 #include "src/scopes.h"
15 16
16 namespace v8 { 17 namespace v8 {
17 class ScriptCompiler; 18 class ScriptCompiler;
18 19
19 namespace internal { 20 namespace internal {
20 21
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 837
837 Scanner scanner_; 838 Scanner scanner_;
838 PreParser* reusable_preparser_; 839 PreParser* reusable_preparser_;
839 Scope* original_scope_; // for ES5 function declarations in sloppy eval 840 Scope* original_scope_; // for ES5 function declarations in sloppy eval
840 Target* target_stack_; // for break, continue statements 841 Target* target_stack_; // for break, continue statements
841 ScriptCompiler::CompileOptions compile_options_; 842 ScriptCompiler::CompileOptions compile_options_;
842 ParseData* cached_parse_data_; 843 ParseData* cached_parse_data_;
843 844
844 bool parsing_lazy_arrow_parameters_; // for lazily parsed arrow functions. 845 bool parsing_lazy_arrow_parameters_; // for lazily parsed arrow functions.
845 846
846 // Pending errors. 847 PendingCompilationErrorHandler pending_error_handler_;
847 bool has_pending_error_;
848 Scanner::Location pending_error_location_;
849 const char* pending_error_message_;
850 const AstRawString* pending_error_arg_;
851 const char* pending_error_char_arg_;
852 ParseErrorType pending_error_type_;
853 848
854 // Other information which will be stored in Parser and moved to Isolate after 849 // Other information which will be stored in Parser and moved to Isolate after
855 // parsing. 850 // parsing.
856 int use_counts_[v8::Isolate::kUseCounterFeatureCount]; 851 int use_counts_[v8::Isolate::kUseCounterFeatureCount];
857 int total_preparse_skipped_; 852 int total_preparse_skipped_;
858 HistogramTimer* pre_parse_timer_; 853 HistogramTimer* pre_parse_timer_;
859 854
860 bool parsing_on_main_thread_; 855 bool parsing_on_main_thread_;
861 }; 856 };
862 857
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 } 940 }
946 941
947 942
948 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, 943 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
949 int start, Expression* tag) { 944 int start, Expression* tag) {
950 return parser_->CloseTemplateLiteral(state, start, tag); 945 return parser_->CloseTemplateLiteral(state, start, tag);
951 } 946 }
952 } } // namespace v8::internal 947 } } // namespace v8::internal
953 948
954 #endif // V8_PARSER_H_ 949 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698