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

Side by Side Diff: src/parsing/preparser.h

Issue 2509683002: [counters] Use separate counters for background parsing (Closed)
Patch Set: using const arrays instead of two-level ternary syntax. Created 4 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/parsing/parser-base.h ('k') | src/parsing/preparser.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_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/parsing/parser-base.h" 9 #include "src/parsing/parser-base.h"
10 10
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 typedef PreParserIdentifier Identifier; 831 typedef PreParserIdentifier Identifier;
832 typedef PreParserExpression Expression; 832 typedef PreParserExpression Expression;
833 typedef PreParserStatement Statement; 833 typedef PreParserStatement Statement;
834 834
835 enum PreParseResult { 835 enum PreParseResult {
836 kPreParseStackOverflow, 836 kPreParseStackOverflow,
837 kPreParseAbort, 837 kPreParseAbort,
838 kPreParseSuccess 838 kPreParseSuccess
839 }; 839 };
840 840
841 PreParser(Zone* zone, Scanner* scanner, AstValueFactory* ast_value_factory, 841 PreParser(Zone* zone, Scanner* scanner, uintptr_t stack_limit,
842 AstValueFactory* ast_value_factory,
842 PendingCompilationErrorHandler* pending_error_handler, 843 PendingCompilationErrorHandler* pending_error_handler,
843 RuntimeCallStats* runtime_call_stats, uintptr_t stack_limit) 844 RuntimeCallStats* runtime_call_stats,
845 bool parsing_on_main_thread = true)
844 : ParserBase<PreParser>(zone, scanner, stack_limit, nullptr, 846 : ParserBase<PreParser>(zone, scanner, stack_limit, nullptr,
845 ast_value_factory, runtime_call_stats), 847 ast_value_factory, runtime_call_stats,
848 parsing_on_main_thread),
846 use_counts_(nullptr), 849 use_counts_(nullptr),
847 track_unresolved_variables_(false), 850 track_unresolved_variables_(false),
848 pending_error_handler_(pending_error_handler) {} 851 pending_error_handler_(pending_error_handler) {}
849 852
850 static bool const IsPreParser() { return true; } 853 static bool const IsPreParser() { return true; }
851 854
852 PreParserLogger* logger() { return &log_; } 855 PreParserLogger* logger() { return &log_; }
853 856
854 // Pre-parse the program from the character stream; returns true on 857 // Pre-parse the program from the character stream; returns true on
855 // success (even if parsing failed, the pre-parse data successfully 858 // success (even if parsing failed, the pre-parse data successfully
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 function_state_->NextMaterializedLiteralIndex(); 1560 function_state_->NextMaterializedLiteralIndex();
1558 function_state_->NextMaterializedLiteralIndex(); 1561 function_state_->NextMaterializedLiteralIndex();
1559 } 1562 }
1560 return EmptyExpression(); 1563 return EmptyExpression();
1561 } 1564 }
1562 1565
1563 } // namespace internal 1566 } // namespace internal
1564 } // namespace v8 1567 } // namespace v8
1565 1568
1566 #endif // V8_PARSING_PREPARSER_H 1569 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698