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

Unified Diff: src/parsing/preparser.h

Issue 2373443003: Revert of Preparse inner functions (new try) (Closed)
Patch Set: 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 | « src/parsing/parser-base.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 72fa36d18352dc543c6f55efba2d6b62dc9f4d85..e3a4ece78dd9199097876f225e834681d961e0a7 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -112,12 +112,10 @@
kAsyncIdentifier
};
- explicit PreParserIdentifier(Type type) : type_(type), string_(nullptr) {}
+ explicit PreParserIdentifier(Type type) : type_(type) {}
Type type_;
- // Only non-nullptr when PreParser.track_unresolved_variables_ is true.
- const AstRawString* string_;
+
friend class PreParserExpression;
- friend class PreParser;
};
@@ -776,8 +774,7 @@
ParserRecorder* log, uintptr_t stack_limit)
: ParserBase<PreParser>(zone, scanner, stack_limit, NULL,
ast_value_factory, log),
- use_counts_(nullptr),
- track_unresolved_variables_(false) {}
+ use_counts_(nullptr) {}
// Pre-parse the program from the character stream; returns true on
// success (even if parsing failed, the pre-parse data successfully
@@ -823,10 +820,10 @@
// keyword and parameters, and have consumed the initial '{'.
// At return, unless an error occurred, the scanner is positioned before the
// the final '}'.
- PreParseResult PreParseLazyFunction(FunctionKind kind,
- DeclarationScope* function_scope,
+ PreParseResult PreParseLazyFunction(LanguageMode language_mode,
+ FunctionKind kind,
+ bool has_simple_parameters,
bool parsing_module, ParserRecorder* log,
- bool track_unresolved_variables,
bool may_abort, int* use_counts);
private:
@@ -853,9 +850,9 @@
const PreParserFormalParameters& parameters, FunctionKind kind,
FunctionLiteral::FunctionType function_type, bool* ok);
- V8_INLINE LazyParsingResult SkipLazyFunctionBody(
- int* materialized_literal_count, int* expected_property_count,
- bool track_unresolved_variables, bool may_abort, bool* ok) {
+ V8_INLINE LazyParsingResult
+ SkipLazyFunctionBody(int* materialized_literal_count,
+ int* expected_property_count, bool may_abort, bool* ok) {
UNREACHABLE();
return kLazyParsingComplete;
}
@@ -1307,9 +1304,11 @@
return PreParserExpression::Default();
}
- PreParserExpression ExpressionFromIdentifier(
+ V8_INLINE PreParserExpression ExpressionFromIdentifier(
PreParserIdentifier name, int start_position, int end_position,
- InferName infer = InferName::kYes);
+ InferName infer = InferName::kYes) {
+ return PreParserExpression::FromIdentifier(name);
+ }
V8_INLINE PreParserExpression ExpressionFromString(int pos) {
if (scanner()->UnescapedLiteralMatches("use strict", 10)) {
@@ -1418,7 +1417,6 @@
// Preparser's private field members.
int* use_counts_;
- bool track_unresolved_variables_;
};
PreParserExpression PreParser::SpreadCall(PreParserExpression function,
« 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