Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 5565e01f547fc2db137c61a1c82d8594b4cdef41..5efa2e60c283954b9bbe0d201dc42eadb7e19d7d 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1860,7 +1860,7 @@ void BytecodeGenerator::BuildVariableLoad(Variable* variable, |
execution_context()->ContextChainDepth(local_variable->scope()); |
builder()->LoadLookupContextSlot(variable->name(), typeof_mode, |
local_variable->index(), depth); |
- if (hole_check_mode == HoleCheckMode::kRequired) { |
+ if (local_variable->binding_needs_init()) { |
rmcilroy
2016/12/05 19:18:07
This seems a bit hacky, I would rather fix the hol
Leszek Swirski
2016/12/05 19:42:37
That's what I thought originally, but non-local va
adamk
2016/12/06 19:16:42
I think it's possible for us to do this determinat
Leszek Swirski
2016/12/07 16:09:52
Fair enough, I was worried that changing it here w
|
BuildThrowIfHole(variable->name()); |
} |
break; |