| Index: src/full-codegen/arm64/full-codegen-arm64.cc
|
| diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
|
| index 5cff899c61cf5a527fea70b9979b3545f912cf93..9aec58267260f9b993d7121550cd5958263557f4 100644
|
| --- a/src/full-codegen/arm64/full-codegen-arm64.cc
|
| +++ b/src/full-codegen/arm64/full-codegen-arm64.cc
|
| @@ -5284,23 +5284,23 @@ 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.
|
| DCHECK(kSmiTag == 0);
|
| __ Push(xzr);
|
| - } else if (declaration_scope->is_eval_scope()) {
|
| + } else if (closure_scope->is_eval_scope()) {
|
| // Contexts created by a call to eval have the same closure as the
|
| // context calling eval, not the anonymous closure containing the eval
|
| // code. Fetch it from the context.
|
| __ Ldr(x10, ContextMemOperand(cp, Context::CLOSURE_INDEX));
|
| __ Push(x10);
|
| } else {
|
| - DCHECK(declaration_scope->is_function_scope());
|
| + DCHECK(closure_scope->is_function_scope());
|
| __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| __ Push(x10);
|
| }
|
|
|