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

Unified Diff: src/parsing/parser.h

Issue 2297733002: [parser] Refactor bookmark in SkipLazyFunctionBody (Closed)
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index afd490cbe4612a88e758fccda71d01e6e9926018..fb04c3528fa07e64f18002659cd55da703953956 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -544,15 +544,14 @@ class Parser : public ParserBase<Parser> {
// Skip over a lazy function, either using cached data if we have it, or
// by parsing the function with PreParser. Consumes the ending }.
//
- // If bookmark is set, the (pre-)parser may decide to abort skipping
+ // If may_abort == true, the (pre-)parser may decide to abort skipping
// in order to force the function to be eagerly parsed, after all.
adamk 2016/08/30 22:13:14 Mention when it'll return true vs false? I was sur
nickie 2016/08/31 13:23:36 Done.
- // In this case, it'll reset the scanner using the bookmark.
- void SkipLazyFunctionBody(int* materialized_literal_count,
- int* expected_property_count, bool* ok,
- Scanner::BookmarkScope* bookmark = nullptr);
+ bool SkipLazyFunctionBody(int* materialized_literal_count,
+ int* expected_property_count, bool may_abort,
+ bool* ok);
PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser(
- SingletonLogger* logger, Scanner::BookmarkScope* bookmark = nullptr);
+ SingletonLogger* logger, bool may_abort);
Block* BuildParameterInitializationBlock(
const ParserFormalParameters& parameters, bool* ok);
@@ -878,6 +877,9 @@ class Parser : public ParserBase<Parser> {
V8_INLINE static ZoneList<Expression*>* NullExpressionList() {
return nullptr;
}
+ V8_INLINE static ZoneList<Statement*>* NullStatementList() {
+ return nullptr;
+ }
// Non-NULL empty string.
V8_INLINE const AstRawString* EmptyIdentifierString() const {
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698