Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 9b6ee0b67906f678246b5469292372fb470e8ade..90642740d58e4e263e8846967d25d37e4a0bd583 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -4226,19 +4226,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. |
__ li(at, 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. |
__ lw(at, ContextOperand(cp, Context::CLOSURE_INDEX)); |
} else { |
- ASSERT(scope()->is_function_scope()); |
+ ASSERT(declaration_scope->is_function_scope()); |
__ lw(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
} |
__ push(at); |