Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index e3063d8b1fc251ddc5b493391e5fbb858ad097ad..daa0a2df6dcc3f944493a0fc7dd4632cf260a1db 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -1982,14 +1982,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 |
@@ -2366,9 +2358,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) { |
caitp (gmail)
2016/04/14 00:17:30
This is not really the job of this CL, but this lo
caitp (gmail)
2016/04/14 00:25:16
eh, other vendors seem to behave the same, did the
adamk
2016/04/14 00:37:24
Nope, nothing recent here. Let variables are hole-
|
value = GetLiteralUndefined(position()); |
} |
} |