| Index: src/full-codegen/x87/full-codegen-x87.cc
|
| diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
|
| index f804bc46f267193d0949c29c8d5c5a77964d6c23..1e93fe1fa86a029e662a5f6e5fe76d20c7fde88b 100644
|
| --- a/src/full-codegen/x87/full-codegen-x87.cc
|
| +++ b/src/full-codegen/x87/full-codegen-x87.cc
|
| @@ -5180,21 +5180,21 @@ void FullCodeGenerator::LoadContextField(Register dst, int context_index) {
|
|
|
|
|
| void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
|
| - Scope* declaration_scope = scope()->DeclarationScope();
|
| - if (declaration_scope->is_script_scope() ||
|
| - declaration_scope->is_module_scope()) {
|
| + Scope* closure_scope = scope()->ClosureScope();
|
| + if (closure_scope->is_script_scope() ||
|
| + closure_scope->is_module_scope()) {
|
| // Contexts nested in the native context have a canonical empty function
|
| // as their closure, not the anonymous closure containing the global
|
| // code. Pass a smi sentinel and let the runtime look up the empty
|
| // function.
|
| __ push(Immediate(Smi::FromInt(0)));
|
| - } else if (declaration_scope->is_eval_scope()) {
|
| + } else if (closure_scope->is_eval_scope()) {
|
| // Contexts nested inside eval code have the same closure as the context
|
| // calling eval, not the anonymous closure containing the eval code.
|
| // Fetch it from the context.
|
| __ push(ContextOperand(esi, Context::CLOSURE_INDEX));
|
| } else {
|
| - DCHECK(declaration_scope->is_function_scope());
|
| + DCHECK(closure_scope->is_function_scope());
|
| __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| }
|
| }
|
|
|