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

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

Issue 2387593002: Revert of Reland: [modules] Properly initialize declared variables. (Closed)
Patch Set: Created 4 years, 3 months 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 | « src/globals.h ('k') | src/objects.h » ('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 0f07fc0794bc6d1d16e1870c60875ddbed759931..5b3959f5c317e85875b160de8e97b7e1849c6ce9 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -932,12 +932,7 @@
break;
}
case VariableLocation::MODULE:
- if (variable->IsExport() && variable->binding_needs_init()) {
- builder()->LoadTheHole();
- VisitVariableAssignment(variable, Token::INIT,
- FeedbackVectorSlot::Invalid());
- }
- // Nothing to do for imports.
+ // Nothing to do here.
break;
}
}
@@ -977,8 +972,7 @@
break;
}
case VariableLocation::MODULE:
- DCHECK_EQ(variable->mode(), LET);
- DCHECK(variable->IsExport());
+ DCHECK(variable->mode() == LET);
VisitForAccumulatorValue(decl->fun());
VisitVariableAssignment(variable, Token::INIT,
FeedbackVectorSlot::Invalid());
@@ -2024,7 +2018,6 @@
.StoreAccumulatorInRegister(module_request)
.CallRuntime(Runtime::kLoadModuleImport, import_name, 2);
}
- BuildHoleCheckForVariableLoad(variable);
break;
}
}
« no previous file with comments | « src/globals.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698