Reviewers: dstence, michael_dawson, Toon Verwaest,
Message:
Please TAL.
Description:
PPC: Only swap undefined for the global object if necessary in the prologue
Port fab3508062396c2768b5dcfa0fd7d40eba527d62
[email protected], [email protected], [email protected]
BUG=
Please review this at https://codereview.chromium.org/1122773002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -2 lines):
M src/ppc/full-codegen-ppc.cc
M src/ppc/lithium-codegen-ppc.cc
Index: src/ppc/full-codegen-ppc.cc
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
index
b80a2b24fd5290b888052f3e11e2088f633ce00d..27de1dcecb39cabe0595b73a8e6b16c8a872f7e5
100644
--- a/src/ppc/full-codegen-ppc.cc
+++ b/src/ppc/full-codegen-ppc.cc
@@ -123,7 +123,8 @@ 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()) {
+ if (is_sloppy(info->language_mode()) && !info->is_native() &&
+ info->MayUseThis()) {
Label ok;
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ LoadP(r5, MemOperand(sp, receiver_offset), r0);
Index: src/ppc/lithium-codegen-ppc.cc
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc
index
50dcd191274286b61c63b4fefc2831438e719f38..fb2b8238229e97f572788880764943e9807be1f5
100644
--- a/src/ppc/lithium-codegen-ppc.cc
+++ b/src/ppc/lithium-codegen-ppc.cc
@@ -118,7 +118,7 @@ bool LCodeGen::GeneratePrologue() {
// Sloppy mode functions and builtins need to replace the receiver
with the
// global proxy when called as functions (without an explicit receiver
// object).
- if (graph()->this_has_uses() && is_sloppy(info_->language_mode()) &&
+ if (is_sloppy(info_->language_mode()) && info()->MayUseThis() &&
!info_->is_native()) {
Label ok;
int receiver_offset = info_->scope()->num_parameters() *
kPointerSize;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.