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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2051073004: Remove more dead code now that legacy const is gone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix x64 build, add mips64 Created 4 years, 6 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 | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 2db1873fdf10c051effb0672148d62e53b3b7537..dddba9d23da6e118e7987e7f0e714f8b43929101 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1132,13 +1132,9 @@ void AstGraphBuilder::VisitVariableDeclaration(VariableDeclaration* decl) {
}
break;
case VariableLocation::LOOKUP: {
+ DCHECK(!hole_init);
Node* name = jsgraph()->Constant(variable->name());
- // For variables we must not push an initial value (such as 'undefined')
- // because we may have a (legal) redeclaration and we must not destroy
- // the current value.
- Node* value =
- hole_init ? jsgraph()->TheHoleConstant()
- : jsgraph()->ZeroConstant(); // Indicates no initial value.
+ Node* value = jsgraph()->ZeroConstant(); // Indicates no initial value.
Node* attr =
jsgraph()->Constant(variable->DeclarationPropertyAttributes());
const Operator* op =
« no previous file with comments | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698