Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 4255d66868cd6f4fd8dee95057e99ae2ef7695b9..bb9fe954ebbf4f5ceec1504d2e0e86f61dd095ea 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -1693,8 +1693,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
if (key->value()->IsInternalizedString()) { |
if (property->emit_store()) { |
VisitForAccumulatorValue(value); |
- __ mov(r2, Operand(key->value())); |
- __ ldr(r1, MemOperand(sp)); |
+ ASSERT(StoreIC::ValueRegister().is(r0)); |
+ __ mov(StoreIC::NameRegister(), Operand(key->value())); |
+ __ ldr(StoreIC::ReceiverRegister(), MemOperand(sp)); |
CallStoreIC(key->LiteralFeedbackId()); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
} else { |
@@ -2420,9 +2421,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
case NAMED_PROPERTY: { |
__ push(r0); // Preserve value. |
VisitForAccumulatorValue(prop->obj()); |
- __ mov(r1, r0); |
- __ pop(r0); // Restore value. |
- __ mov(r2, Operand(prop->key()->AsLiteral()->value())); |
+ __ Move(StoreIC::ReceiverRegister(), r0); |
+ __ pop(StoreIC::ValueRegister()); // Restore value. |
+ __ mov(StoreIC::NameRegister(), |
+ Operand(prop->key()->AsLiteral()->value())); |
CallStoreIC(); |
break; |
} |
@@ -2430,8 +2432,8 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
__ push(r0); // Preserve value. |
VisitForStackValue(prop->obj()); |
VisitForAccumulatorValue(prop->key()); |
- __ mov(r1, r0); |
- __ Pop(r0, r2); // r0 = restored value. |
+ __ Move(KeyedStoreIC::NameRegister(), r0); |
+ __ Pop(KeyedStoreIC::ValueRegister(), KeyedStoreIC::ReceiverRegister()); |
Handle<Code> ic = strict_mode() == SLOPPY |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
@@ -2469,8 +2471,8 @@ void FullCodeGenerator::EmitCallStoreContextSlot( |
void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { |
if (var->IsUnallocated()) { |
// Global var, const, or let. |
- __ mov(r2, Operand(var->name())); |
- __ ldr(r1, GlobalObjectOperand()); |
+ __ mov(StoreIC::NameRegister(), Operand(var->name())); |
+ __ ldr(StoreIC::ReceiverRegister(), GlobalObjectOperand()); |
CallStoreIC(); |
} else if (op == Token::INIT_CONST_LEGACY) { |
@@ -2540,9 +2542,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
// Record source code position before IC call. |
SetSourcePosition(expr->position()); |
- __ mov(r2, Operand(prop->key()->AsLiteral()->value())); |
- __ pop(r1); |
- |
+ __ mov(StoreIC::NameRegister(), Operand(prop->key()->AsLiteral()->value())); |
+ __ pop(StoreIC::ReceiverRegister()); |
CallStoreIC(expr->AssignmentFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
@@ -2555,7 +2556,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
// Record source code position before IC call. |
SetSourcePosition(expr->position()); |
- __ Pop(r2, r1); // r1 = key. |
+ __ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister()); |
+ ASSERT(KeyedStoreIC::ValueRegister().is(r0)); |
Handle<Code> ic = strict_mode() == SLOPPY |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
@@ -4354,8 +4356,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} |
break; |
case NAMED_PROPERTY: { |
- __ mov(r2, Operand(prop->key()->AsLiteral()->value())); |
- __ pop(r1); |
+ __ mov(StoreIC::NameRegister(), |
+ Operand(prop->key()->AsLiteral()->value())); |
+ __ pop(StoreIC::ReceiverRegister()); |
CallStoreIC(expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
@@ -4368,7 +4371,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
break; |
} |
case KEYED_PROPERTY: { |
- __ Pop(r2, r1); // r1 = key. r2 = receiver. |
+ __ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister()); |
Handle<Code> ic = strict_mode() == SLOPPY |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |