| Index: src/parsing/parser.cc
|
| diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
|
| index 3751acba6bd4be2c24628625f2fd5c29765c2b53..53d18fb3e9b9304d1def1dfcd04806924f298231 100644
|
| --- a/src/parsing/parser.cc
|
| +++ b/src/parsing/parser.cc
|
| @@ -1972,14 +1972,6 @@ Variable* Parser::Declare(Declaration* declaration,
|
| // RuntimeHidden_DeclareLookupSlot calls.
|
| declaration_scope->AddDeclaration(declaration);
|
|
|
| - if (mode == CONST_LEGACY && declaration_scope->is_script_scope()) {
|
| - // For global const variables we bind the proxy to a variable.
|
| - DCHECK(resolve); // should be set by all callers
|
| - Variable::Kind kind = Variable::NORMAL;
|
| - var = new (zone()) Variable(declaration_scope, name, mode, kind,
|
| - kNeedsInitialization, kNotAssigned);
|
| - }
|
| -
|
| // If requested and we have a local variable, bind the proxy to the variable
|
| // at parse-time. This is used for functions (and consts) declared inside
|
| // statements: the corresponding function (or const) variable must be in the
|
| @@ -2344,9 +2336,8 @@ Block* Parser::ParseVariableDeclarations(
|
| return nullptr;
|
| }
|
|
|
| - // 'let x' and (legacy) 'const x' initialize 'x' to undefined.
|
| - if (parsing_result->descriptor.mode == LET ||
|
| - parsing_result->descriptor.mode == CONST_LEGACY) {
|
| + // 'let x' initializes 'x' to undefined.
|
| + if (parsing_result->descriptor.mode == LET) {
|
| value = GetLiteralUndefined(position());
|
| }
|
| }
|
|
|