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

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

Issue 2061173002: [cleanup] Remove dead code from DeclareLookupSlot and rename it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handled review comments 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 | « src/ast/variables.cc ('k') | 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 dddba9d23da6e118e7987e7f0e714f8b43929101..5590400571111090319ff53feb77e358a9bb4645 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1134,12 +1134,8 @@ void AstGraphBuilder::VisitVariableDeclaration(VariableDeclaration* decl) {
case VariableLocation::LOOKUP: {
DCHECK(!hole_init);
Node* name = jsgraph()->Constant(variable->name());
- Node* value = jsgraph()->ZeroConstant(); // Indicates no initial value.
- Node* attr =
- jsgraph()->Constant(variable->DeclarationPropertyAttributes());
- const Operator* op =
- javascript()->CallRuntime(Runtime::kDeclareLookupSlot);
- Node* store = NewNode(op, name, value, attr);
+ const Operator* op = javascript()->CallRuntime(Runtime::kDeclareEvalVar);
+ Node* store = NewNode(op, name);
PrepareFrameState(store, decl->proxy()->id());
break;
}
@@ -1178,11 +1174,9 @@ void AstGraphBuilder::VisitFunctionDeclaration(FunctionDeclaration* decl) {
VisitForValue(decl->fun());
Node* value = environment()->Pop();
Node* name = jsgraph()->Constant(variable->name());
- Node* attr =
- jsgraph()->Constant(variable->DeclarationPropertyAttributes());
const Operator* op =
- javascript()->CallRuntime(Runtime::kDeclareLookupSlot);
- Node* store = NewNode(op, name, value, attr);
+ javascript()->CallRuntime(Runtime::kDeclareEvalFunction);
+ Node* store = NewNode(op, name, value);
PrepareFrameState(store, decl->proxy()->id());
break;
}
« no previous file with comments | « src/ast/variables.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698