| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index e6acf4d157e35986d402e5f37bca597594946ae6..23305961d6bfd125fee2eb02b489f72038dc4c35 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -3505,13 +3505,10 @@ Node* AstGraphBuilder::BuildVariableAssignment(
|
| return value;
|
| } else if (mode == LET && op != Token::INIT_LET) {
|
| // Perform an initialization check for let declared variables.
|
| - // Also note that the dynamic hole-check is only done to ensure that
|
| - // this does not break in the presence of do-expressions within the
|
| - // temporal dead zone of a let declared variable.
|
| Node* current = environment()->Lookup(variable);
|
| if (current->op() == the_hole->op()) {
|
| value = BuildThrowReferenceError(variable, bailout_id);
|
| - } else if (value->opcode() == IrOpcode::kPhi) {
|
| + } else if (current->opcode() == IrOpcode::kPhi) {
|
| value = BuildHoleCheckThenThrow(current, variable, value, bailout_id);
|
| }
|
| } else if (mode == CONST && op == Token::INIT_CONST) {
|
| @@ -3527,7 +3524,7 @@ Node* AstGraphBuilder::BuildVariableAssignment(
|
| Node* current = environment()->Lookup(variable);
|
| if (current->op() == the_hole->op()) {
|
| return BuildThrowReferenceError(variable, bailout_id);
|
| - } else if (value->opcode() == IrOpcode::kPhi) {
|
| + } else if (current->opcode() == IrOpcode::kPhi) {
|
| BuildHoleCheckThenThrow(current, variable, value, bailout_id);
|
| }
|
| return BuildThrowConstAssignError(bailout_id);
|
|
|