Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 556ec85249bb9437a3fc244a2f617baeaa88dc15..4df0d5fbcedb44c26e433f1b6bfdc497255749f7 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1686,11 +1686,21 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
} |
case KEYED_PROPERTY: { |
__ push(rax); // Preserve value. |
- VisitForStackValue(prop->obj()); |
- VisitForAccumulatorValue(prop->key()); |
- __ movq(rcx, rax); |
- __ pop(rdx); |
- __ pop(rax); |
+ if (prop->is_synthetic()) { |
+ ASSERT(prop->obj()->AsVariableProxy() != NULL); |
+ ASSERT(prop->key()->AsLiteral() != NULL); |
+ { AccumulatorValueContext for_object(this); |
+ EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); |
+ } |
+ __ movq(rdx, rax); |
+ __ Move(rcx, prop->key()->AsLiteral()->handle()); |
+ } else { |
+ VisitForStackValue(prop->obj()); |
+ VisitForAccumulatorValue(prop->key()); |
+ __ movq(rcx, rax); |
+ __ pop(rdx); |
+ } |
+ __ pop(rax); // Restore value. |
Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |
break; |