Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index e0fe8356367157c5cddd3f892450ddbd1f524efc..7fc7c767211ee0fd88d37310a7e8064c40fceda6 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1666,8 +1666,9 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
if (key->value()->IsInternalizedString()) { |
if (property->emit_store()) { |
VisitForAccumulatorValue(value); |
- __ Move(rcx, key->value()); |
- __ movp(rdx, Operand(rsp, 0)); |
+ ASSERT(StoreIC::ValueRegister().is(rax)); |
+ __ Move(StoreIC::NameRegister(), key->value()); |
+ __ movp(StoreIC::ReceiverRegister(), Operand(rsp, 0)); |
CallStoreIC(key->LiteralFeedbackId()); |
PrepareForBailoutForId(key->id(), NO_REGISTERS); |
} else { |
@@ -2347,9 +2348,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
case NAMED_PROPERTY: { |
__ Push(rax); // Preserve value. |
VisitForAccumulatorValue(prop->obj()); |
- __ movp(rdx, rax); |
- __ Pop(rax); // Restore value. |
- __ Move(rcx, prop->key()->AsLiteral()->value()); |
+ __ Move(StoreIC::ReceiverRegister(), rax); |
+ __ Pop(StoreIC::ValueRegister()); // Restore value. |
+ __ Move(StoreIC::NameRegister(), prop->key()->AsLiteral()->value()); |
CallStoreIC(); |
break; |
} |
@@ -2357,9 +2358,9 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
__ Push(rax); // Preserve value. |
VisitForStackValue(prop->obj()); |
VisitForAccumulatorValue(prop->key()); |
- __ movp(rcx, rax); |
- __ Pop(rdx); |
- __ Pop(rax); // Restore value. |
+ __ Move(KeyedStoreIC::NameRegister(), rax); |
+ __ Pop(KeyedStoreIC::ReceiverRegister()); |
+ __ Pop(KeyedStoreIC::ValueRegister()); // Restore value. |
Handle<Code> ic = strict_mode() == SLOPPY |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
@@ -2396,8 +2397,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
Token::Value op) { |
if (var->IsUnallocated()) { |
// Global var, const, or let. |
- __ Move(rcx, var->name()); |
- __ movp(rdx, GlobalObjectOperand()); |
+ __ Move(StoreIC::NameRegister(), var->name()); |
+ __ movp(StoreIC::ReceiverRegister(), GlobalObjectOperand()); |
CallStoreIC(); |
} else if (op == Token::INIT_CONST_LEGACY) { |
@@ -2465,8 +2466,8 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
// Record source code position before IC call. |
SetSourcePosition(expr->position()); |
- __ Move(rcx, prop->key()->AsLiteral()->value()); |
- __ Pop(rdx); |
+ __ Move(StoreIC::NameRegister(), prop->key()->AsLiteral()->value()); |
+ __ Pop(StoreIC::ReceiverRegister()); |
CallStoreIC(expr->AssignmentFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
@@ -2477,8 +2478,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
// Assignment to a property, using a keyed store IC. |
- __ Pop(rcx); |
- __ Pop(rdx); |
+ __ Pop(KeyedStoreIC::NameRegister()); // Key. |
+ __ Pop(KeyedStoreIC::ReceiverRegister()); |
+ ASSERT(KeyedStoreIC::ValueRegister().is(rax)); |
// Record source code position before IC call. |
SetSourcePosition(expr->position()); |
Handle<Code> ic = strict_mode() == SLOPPY |
@@ -4340,8 +4342,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} |
break; |
case NAMED_PROPERTY: { |
- __ Move(rcx, prop->key()->AsLiteral()->value()); |
- __ Pop(rdx); |
+ __ Move(StoreIC::NameRegister(), prop->key()->AsLiteral()->value()); |
+ __ Pop(StoreIC::ReceiverRegister()); |
CallStoreIC(expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |
@@ -4354,8 +4356,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
break; |
} |
case KEYED_PROPERTY: { |
- __ Pop(rcx); |
- __ Pop(rdx); |
+ __ Pop(KeyedStoreIC::NameRegister()); |
+ __ Pop(KeyedStoreIC::ReceiverRegister()); |
Handle<Code> ic = strict_mode() == SLOPPY |
? isolate()->builtins()->KeyedStoreIC_Initialize() |
: isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |