Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index eb5d8fb8211babc5467e7361802f18e53df888d0..4b55915e916d8419b9f1f6dbe7029295d1bd77bc 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -4243,19 +4243,20 @@ void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
- if (scope()->is_global_scope()) { |
+ Scope* declaration_scope = scope()->DeclarationScope(); |
+ if (declaration_scope->is_global_scope()) { |
// Contexts nested in the global 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. |
__ mov(ip, Operand(Smi::FromInt(0))); |
- } else if (scope()->is_eval_scope()) { |
+ } else if (declaration_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(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); |
} else { |
- ASSERT(scope()->is_function_scope() || scope()->is_catch_scope()); |
+ ASSERT(declaration_scope->is_function_scope()); |
__ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
} |
__ push(ip); |