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

Unified Diff: src/parsing/preparser.h

Issue 2349473004: Revert of Preparse inner functions. (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 7ea3921d3900676ecc56cd66ed68ee8c70a13d43..8c2fb66abf9324e0734e9ebe689aaf9bcbcc973c 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;
};
@@ -763,8 +761,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
@@ -810,10 +807,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:
@@ -842,9 +839,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;
}
@@ -1257,9 +1254,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)) {
@@ -1374,7 +1373,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