| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/ic/ic.h" | 7 #include "src/ic/ic.h" |
| 8 #include "src/ic/ic-compiler.h" | 8 #include "src/ic/ic-compiler.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 #define __ ACCESS_MASM(masm) | 13 #define __ ACCESS_MASM(masm) |
| 14 | 14 |
| 15 | 15 |
| 16 void PropertyICCompiler::GenerateRuntimeSetProperty( | 16 void PropertyICCompiler::GenerateRuntimeSetProperty( |
| 17 MacroAssembler* masm, LanguageMode language_mode) { | 17 MacroAssembler* masm, LanguageMode language_mode) { |
| 18 // Return address is on the stack. | 18 STATIC_ASSERT(StoreWithVectorDescriptor::kStackArgumentsCount == 3); |
| 19 DCHECK(!ebx.is(StoreDescriptor::ReceiverRegister()) && | 19 // Current stack layout: |
| 20 !ebx.is(StoreDescriptor::NameRegister()) && | 20 // - esp[12] -- value |
| 21 !ebx.is(StoreDescriptor::ValueRegister())); | 21 // - esp[8] -- slot |
| 22 // - esp[4] -- vector |
| 23 // - esp[0] -- return address |
| 24 |
| 25 __ mov(Operand(esp, 12), StoreDescriptor::ReceiverRegister()); |
| 26 __ mov(Operand(esp, 8), StoreDescriptor::NameRegister()); |
| 27 __ mov(Operand(esp, 4), StoreDescriptor::ValueRegister()); |
| 22 __ pop(ebx); | 28 __ pop(ebx); |
| 23 __ push(StoreDescriptor::ReceiverRegister()); | |
| 24 __ push(StoreDescriptor::NameRegister()); | |
| 25 __ push(StoreDescriptor::ValueRegister()); | |
| 26 __ push(Immediate(Smi::FromInt(language_mode))); | 29 __ push(Immediate(Smi::FromInt(language_mode))); |
| 27 __ push(ebx); // return address | 30 __ push(ebx); // return address |
| 28 | 31 |
| 29 // Do tail-call to runtime routine. | 32 // Do tail-call to runtime routine. |
| 30 __ TailCallRuntime(Runtime::kSetProperty); | 33 __ TailCallRuntime(Runtime::kSetProperty); |
| 31 } | 34 } |
| 32 | 35 |
| 33 | 36 |
| 34 #undef __ | 37 #undef __ |
| 35 } // namespace internal | 38 } // namespace internal |
| 36 } // namespace v8 | 39 } // namespace v8 |
| 37 | 40 |
| 38 #endif // V8_TARGET_ARCH_IA32 | 41 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |