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

Unified Diff: src/parsing/parser.h

Issue 2297733002: [parser] Refactor bookmark in SkipLazyFunctionBody (Closed)
Patch Set: Fix error with UNREACHABLE Created 4 years, 3 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') | no next file with comments »
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 7ff5fb2415d5c4cd20401b57cad235d1eeeb911a..401755f27d1116737b46f340f906611a69e53923 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -510,16 +510,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.
- // 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);
+ LazyParsingResult 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);
@@ -849,6 +847,7 @@ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698