Directly enter the parsing mode in DoParseProgram
BUG=v8:5501 Review-Url: https://codereview.chromium.org/2413763004 Cr-Commit-Position: refs/heads/master@{#40264}
This commit is contained in:
parent
27228d2ffd
commit
6e3af1070b
@ -783,7 +783,7 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
|
||||
DCHECK_NULL(scope_state_);
|
||||
DCHECK_NULL(target_stack_);
|
||||
|
||||
Mode parsing_mode = allow_lazy() ? PARSE_LAZILY : PARSE_EAGERLY;
|
||||
ParsingModeScope mode(this, allow_lazy() ? PARSE_LAZILY : PARSE_EAGERLY);
|
||||
|
||||
FunctionLiteral* result = NULL;
|
||||
{
|
||||
@ -801,8 +801,6 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
|
||||
|
||||
scope->set_start_position(0);
|
||||
|
||||
// Enter 'scope' with the given parsing mode.
|
||||
ParsingModeScope parsing_mode_scope(this, parsing_mode);
|
||||
FunctionState function_state(&function_state_, &scope_state_, scope);
|
||||
|
||||
ZoneList<Statement*>* body = new(zone()) ZoneList<Statement*>(16, zone());
|
||||
|
Loading…
Reference in New Issue
Block a user