Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 83f03e24a6bb50fefb7e11ded9e3fe9a5c306d06..7e02f6205045dc7eb1a241af57294f85b3369d74 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -4795,9 +4795,10 @@ void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
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. |
- __ mov(ip, Operand(Smi::FromInt(0))); |
+ // code. |
+ __ ldr(ip, GlobalObjectOperand()); |
+ __ ldr(ip, FieldMemOperand(ip, JSGlobalObject::kNativeContextOffset)); |
+ __ ldr(ip, ContextOperand(ip, Context::CLOSURE_INDEX)); |
} 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 |