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 aca151d5ab8fa1e32e529f67c3ab579780dcfd51..634ccdbd2c578e18a16f164f16ba939e91a9e51b 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -117,8 +117,7 @@ void FullCodeGenerator::Generate() { |
// Sloppy mode functions and builtins need to replace the receiver with the |
// global proxy when called as functions (without an explicit receiver |
// object). |
- if (is_sloppy(info->language_mode()) && !info->is_native() && |
- info->MayUseThis() && info->scope()->has_this_declaration()) { |
+ if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
Label ok; |
int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
__ LoadP(r5, MemOperand(sp, receiver_offset), r0); |