OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 VisitForAccumulatorValue(prop->obj()); | 1977 VisitForAccumulatorValue(prop->obj()); |
1978 __ mov(edx, eax); | 1978 __ mov(edx, eax); |
1979 __ pop(eax); // Restore value. | 1979 __ pop(eax); // Restore value. |
1980 __ mov(ecx, prop->key()->AsLiteral()->handle()); | 1980 __ mov(ecx, prop->key()->AsLiteral()->handle()); |
1981 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); | 1981 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); |
1982 EmitCallIC(ic, RelocInfo::CODE_TARGET); | 1982 EmitCallIC(ic, RelocInfo::CODE_TARGET); |
1983 break; | 1983 break; |
1984 } | 1984 } |
1985 case KEYED_PROPERTY: { | 1985 case KEYED_PROPERTY: { |
1986 __ push(eax); // Preserve value. | 1986 __ push(eax); // Preserve value. |
1987 VisitForStackValue(prop->obj()); | 1987 if (prop->is_synthetic()) { |
1988 VisitForAccumulatorValue(prop->key()); | 1988 ASSERT(prop->obj()->AsVariableProxy() != NULL); |
1989 __ mov(ecx, eax); | 1989 ASSERT(prop->key()->AsLiteral() != NULL); |
1990 __ pop(edx); | 1990 { AccumulatorValueContext for_object(this); |
| 1991 EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); |
| 1992 } |
| 1993 __ mov(edx, eax); |
| 1994 __ Set(ecx, Immediate(prop->key()->AsLiteral()->handle())); |
| 1995 } else { |
| 1996 VisitForStackValue(prop->obj()); |
| 1997 VisitForAccumulatorValue(prop->key()); |
| 1998 __ mov(ecx, eax); |
| 1999 __ pop(edx); |
| 2000 } |
1991 __ pop(eax); // Restore value. | 2001 __ pop(eax); // Restore value. |
1992 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); | 2002 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); |
1993 EmitCallIC(ic, RelocInfo::CODE_TARGET); | 2003 EmitCallIC(ic, RelocInfo::CODE_TARGET); |
1994 break; | 2004 break; |
1995 } | 2005 } |
1996 } | 2006 } |
1997 PrepareForBailoutForId(bailout_ast_id, TOS_REG); | 2007 PrepareForBailoutForId(bailout_ast_id, TOS_REG); |
1998 context()->Plug(eax); | 2008 context()->Plug(eax); |
1999 } | 2009 } |
2000 | 2010 |
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4407 // And return. | 4417 // And return. |
4408 __ ret(0); | 4418 __ ret(0); |
4409 } | 4419 } |
4410 | 4420 |
4411 | 4421 |
4412 #undef __ | 4422 #undef __ |
4413 | 4423 |
4414 } } // namespace v8::internal | 4424 } } // namespace v8::internal |
4415 | 4425 |
4416 #endif // V8_TARGET_ARCH_IA32 | 4426 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |