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

Unified Diff: src/parsing/preparser.h

Issue 2657413002: No need to collect literal counts.
Patch Set: Rebase. Created 3 years, 10 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/preparse-data.cc ('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 72659c2b63ce3c3b4a3c841e9a6e62e23b2f931a..9637fe392b6519f522a0e12581c298b1e14cbe7d 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -676,8 +676,7 @@ class PreParserFactory {
}
PreParserExpression NewFunctionLiteral(
PreParserIdentifier name, Scope* scope, PreParserStatementList body,
- int materialized_literal_count, int expected_property_count,
- int parameter_count, int function_length,
+ int expected_property_count, int parameter_count, int function_length,
FunctionLiteral::ParameterFlag has_duplicate_parameters,
FunctionLiteral::FunctionType function_type,
FunctionLiteral::EagerCompileHint eager_compile_hint, int position,
@@ -894,8 +893,7 @@ class PreParser : public ParserBase<PreParser> {
// success (even if parsing failed, the pre-parse data successfully
// captured the syntax error), and false if a stack-overflow happened
// during parsing.
- PreParseResult PreParseProgram(int* materialized_literals = 0,
- bool is_module = false) {
+ PreParseResult PreParseProgram(bool is_module = false) {
DCHECK_NULL(scope_state_);
DeclarationScope* scope = NewScriptScope();
#ifdef DEBUG
@@ -920,9 +918,6 @@ class PreParser : public ParserBase<PreParser> {
CheckStrictOctalLiteral(start_position, scanner()->location().end_pos,
&ok);
}
- if (materialized_literals) {
- *materialized_literals = function_state_->materialized_literal_count();
- }
return kPreParseSuccess;
}
@@ -956,11 +951,11 @@ class PreParser : public ParserBase<PreParser> {
bool AllowsLazyParsingWithoutUnresolvedVariables() const { return false; }
bool parse_lazily() const { return false; }
- 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 is_inner_function, bool may_abort, bool* ok) {
+ V8_INLINE LazyParsingResult
+ SkipFunction(FunctionKind kind, DeclarationScope* function_scope,
+ int* num_parameters, int* function_length,
+ bool* has_duplicate_parameters, int* expected_property_count,
+ bool is_inner_function, bool may_abort, bool* ok) {
UNREACHABLE();
return kLazyParsingComplete;
}
@@ -1639,12 +1634,6 @@ class PreParser : public ParserBase<PreParser> {
return !tag.IsNoTemplateTag();
}
- V8_INLINE void MaterializeUnspreadArgumentsLiterals(int count) {
- for (int i = 0; i < count; ++i) {
- function_state_->NextMaterializedLiteralIndex();
- }
- }
-
V8_INLINE PreParserExpression
ExpressionListToExpression(PreParserExpressionList args) {
return PreParserExpression::Default(args.variables_);
@@ -1694,12 +1683,6 @@ PreParserExpression PreParser::SpreadCallNew(PreParserExpression function,
PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state,
int start,
PreParserExpression tag) {
- if (IsTaggedTemplate(tag)) {
- // Emulate generation of array literals for tag callsite
- // 1st is array of cooked strings, second is array of raw strings
- function_state_->NextMaterializedLiteralIndex();
- function_state_->NextMaterializedLiteralIndex();
- }
return EmptyExpression();
}
« no previous file with comments | « src/parsing/preparse-data.cc ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698