Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index def1b0bd8994806b6583c6456636ed434fb8881d..0eb7474e003f8e15eaa11a7a0984e8bf7058efda 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -4811,9 +4811,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. |
- __ LoadSmiLiteral(ip, Smi::FromInt(0)); |
+ // code. |
+ __ LoadP(ip, GlobalObjectOperand()); |
+ __ LoadP(ip, FieldMemOperand(ip, JSGlobalObject::kNativeContextOffset)); |
+ __ LoadP(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 |