Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 18c9319c62006a243d48613cd3149e12e47c5ae2..e807d658b6cde01318e993bea223f164da13a172 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -1984,10 +1984,20 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
} |
case KEYED_PROPERTY: { |
__ push(eax); // Preserve value. |
- VisitForStackValue(prop->obj()); |
- VisitForAccumulatorValue(prop->key()); |
- __ mov(ecx, eax); |
- __ pop(edx); |
+ if (prop->is_synthetic()) { |
+ ASSERT(prop->obj()->AsVariableProxy() != NULL); |
+ ASSERT(prop->key()->AsLiteral() != NULL); |
+ { AccumulatorValueContext for_object(this); |
+ EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); |
+ } |
+ __ mov(edx, eax); |
+ __ Set(ecx, Immediate(prop->key()->AsLiteral()->handle())); |
+ } else { |
+ VisitForStackValue(prop->obj()); |
+ VisitForAccumulatorValue(prop->key()); |
+ __ mov(ecx, eax); |
+ __ pop(edx); |
+ } |
__ pop(eax); // Restore value. |
Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); |
EmitCallIC(ic, RelocInfo::CODE_TARGET); |