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

Unified Diff: src/parsing/preparser.h

Issue 2472063002: Preparse lazy function parameters (Closed)
Patch Set: IsArrowFunction 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/preparse-data-format.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 83be879623f3e1819353308c646dec668e9b1b6c..e109656a228d664a40430f6e3e5b048b53109c95 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -887,7 +887,8 @@ class PreParser : public ParserBase<PreParser> {
// keyword and parameters, and have consumed the initial '{'.
// At return, unless an error occurred, the scanner is positioned before the
// the final '}'.
- PreParseResult PreParseFunction(DeclarationScope* function_scope,
+ PreParseResult PreParseFunction(FunctionKind kind,
+ DeclarationScope* function_scope,
bool parsing_module, SingletonLogger* log,
bool track_unresolved_variables,
bool may_abort, int* use_counts);
@@ -910,9 +911,11 @@ class PreParser : public ParserBase<PreParser> {
bool AllowsLazyParsingWithoutUnresolvedVariables() const { return false; }
- V8_INLINE LazyParsingResult SkipLazyFunctionBody(
+ V8_INLINE LazyParsingResult SkipFunction(
+ FunctionKind kind, DeclarationScope* function_scope, int* num_parameters,
+ int* function_length, bool* has_duplicate_parameters,
int* materialized_literal_count, int* expected_property_count,
- bool track_unresolved_variables, bool may_abort, bool* ok) {
+ bool is_inner_function, bool may_abort, bool* ok) {
UNREACHABLE();
return kLazyParsingComplete;
}
@@ -921,7 +924,9 @@ class PreParser : public ParserBase<PreParser> {
FunctionNameValidity function_name_validity, FunctionKind kind,
int function_token_pos, FunctionLiteral::FunctionType function_type,
LanguageMode language_mode, bool* ok);
- LazyParsingResult ParseStatementListAndLogFunction(bool may_abort, bool* ok);
+ LazyParsingResult ParseStatementListAndLogFunction(
+ int position_before_formals, PreParserFormalParameters* formals,
+ bool has_duplicate_parameters, bool maybe_abort, bool* ok);
struct TemplateLiteralState {};
« no previous file with comments | « src/parsing/preparse-data-format.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698