Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2551023004: [ignition] Fix hole check for dynamic local variables (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-669540.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-669540.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698