Reviewers: dstence, Igor Sheludko, michael_dawson,
Description:
PPC: Fix "Support for global var shortcuts in script contexts."
[email protected], [email protected], [email protected]
BUG=
Please review this at https://codereview.chromium.org/1212343007/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -3 lines):
M src/ppc/full-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
2175863721d23a2cfe5899c746825177047fa455..d4444176a1511dbb340f3277d480d8181c25b09f
100644
--- a/src/ppc/full-codegen-ppc.cc
+++ b/src/ppc/full-codegen-ppc.cc
@@ -2746,7 +2746,7 @@ void
FullCodeGenerator::EmitStoreToStackLocalOrContextSlot(
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value
op,
FeedbackVectorICSlot slot) {
- if (var->IsUnallocated()) {
+ if (var->IsUnallocatedOrGlobalSlot()) {
// Global var, const, or let.
__ mov(StoreDescriptor::NameRegister(), Operand(var->name()));
__ LoadP(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
@@ -4846,7 +4846,7 @@ void
FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
// "delete this" is allowed.
bool is_this = var->HasThisName(isolate());
DCHECK(is_sloppy(language_mode()) || is_this);
- if (var->IsUnallocated()) {
+ if (var->IsUnallocatedOrGlobalSlot()) {
__ LoadP(r5, GlobalObjectOperand());
__ mov(r4, Operand(var->name()));
__ LoadSmiLiteral(r3, Smi::FromInt(SLOPPY));
@@ -5202,7 +5202,7 @@ void
FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
DCHECK(!context()->IsEffect());
DCHECK(!context()->IsTest());
VariableProxy* proxy = expr->AsVariableProxy();
- if (proxy != NULL && proxy->var()->IsUnallocated()) {
+ if (proxy != NULL && proxy->var()->IsUnallocatedOrGlobalSlot()) {
Comment cmnt(masm_, "[ Global variable");
__ LoadP(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
--
--
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.