Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 1b7d1169dd2e7e8398914e81950b01268e0ebddc..6f9d54d76ffddff50d591a59869a62f857147a94 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -1092,6 +1092,7 @@ void AstGraphBuilder::VisitVariableDeclaration(VariableDeclaration* decl) { |
switch (variable->location()) { |
case VariableLocation::UNALLOCATED: { |
DCHECK(!variable->binding_needs_init()); |
+ globals()->push_back(variable->name()); |
FeedbackVectorSlot slot = decl->proxy()->VariableFeedbackSlot(); |
DCHECK(!slot.IsInvalid()); |
globals()->push_back(handle(Smi::FromInt(slot.ToInt()), isolate())); |
@@ -1134,6 +1135,7 @@ void AstGraphBuilder::VisitFunctionDeclaration(FunctionDeclaration* decl) { |
decl->fun(), info()->script(), info()); |
// Check for stack-overflow exception. |
if (function.is_null()) return SetStackOverflow(); |
+ globals()->push_back(variable->name()); |
FeedbackVectorSlot slot = decl->proxy()->VariableFeedbackSlot(); |
DCHECK(!slot.IsInvalid()); |
globals()->push_back(handle(Smi::FromInt(slot.ToInt()), isolate())); |
@@ -2905,10 +2907,10 @@ void AstGraphBuilder::VisitDeclarations(Declaration::List* declarations) { |
for (Handle<Object> obj : *globals()) data->set(array_index++, *obj); |
int encoded_flags = info()->GetDeclareGlobalsFlags(); |
Node* flags = jsgraph()->Constant(encoded_flags); |
- Node* pairs = jsgraph()->Constant(data); |
+ Node* decls = jsgraph()->Constant(data); |
Node* vector = jsgraph()->Constant(feedback_vector); |
const Operator* op = javascript()->CallRuntime(Runtime::kDeclareGlobals); |
- Node* call = NewNode(op, pairs, flags, vector); |
+ Node* call = NewNode(op, decls, flags, vector); |
PrepareFrameState(call, BailoutId::Declarations()); |
globals()->clear(); |
} |