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

Unified Diff: src/parser.cc

Issue 1097723005: Lolcode candidate: Both Expression and FunctionLiteral define the same accessor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 8 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/compiler.cc ('k') | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 0ea398ae2e70af74dea66b0006680f984fc24c35..f97174136887ae5be63b81dc44b3a8eea62b9da2 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -378,7 +378,7 @@ FunctionLiteral* Parser::DefaultConstructor(bool call_super, Scope* scope,
materialized_literal_count, expected_property_count, handler_count,
parameter_count, FunctionLiteral::kNoDuplicateParameters,
FunctionLiteral::ANONYMOUS_EXPRESSION, FunctionLiteral::kIsFunction,
- FunctionLiteral::kNotParenthesized, kind, pos);
+ FunctionLiteral::kShouldLazyCompile, kind, pos);
return function_literal;
}
@@ -1039,7 +1039,8 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
function_state.handler_count(), 0,
FunctionLiteral::kNoDuplicateParameters,
FunctionLiteral::ANONYMOUS_EXPRESSION, FunctionLiteral::kGlobalOrEval,
- FunctionLiteral::kNotParenthesized, FunctionKind::kNormalFunction, 0);
+ FunctionLiteral::kShouldLazyCompile, FunctionKind::kNormalFunction,
+ 0);
}
}
@@ -3833,7 +3834,7 @@ void ParserTraits::DeclareArrowFunctionParameters(
}
Expression* left = binop->left();
Expression* right = binop->right();
- if (left->is_parenthesized() || right->is_parenthesized()) {
+ if (left->is_single_parenthesized() || right->is_single_parenthesized()) {
ReportMessageAt(params_loc, "malformed_arrow_function_parameter_list");
*ok = false;
return;
@@ -3975,9 +3976,9 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
int expected_property_count = -1;
int handler_count = 0;
FormalParameterErrorLocations error_locs;
- FunctionLiteral::IsParenthesizedFlag parenthesized = parenthesized_function_
- ? FunctionLiteral::kIsParenthesized
- : FunctionLiteral::kNotParenthesized;
+ FunctionLiteral::EagerCompileHint eager_compile_hint =
+ parenthesized_function_ ? FunctionLiteral::kShouldEagerCompile
+ : FunctionLiteral::kShouldLazyCompile;
// Parse function body.
{
AstNodeFactory function_factory(ast_value_factory());
@@ -4123,7 +4124,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
function_name, ast_value_factory(), scope, body,
materialized_literal_count, expected_property_count, handler_count,
num_parameters, duplicate_parameters, function_type,
- FunctionLiteral::kIsFunction, parenthesized, kind, pos);
+ FunctionLiteral::kIsFunction, eager_compile_hint, kind, pos);
function_literal->set_function_token_position(function_token_pos);
if (scope->has_rest_parameter()) {
« no previous file with comments | « src/compiler.cc ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698