| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 if (is_store) { | 156 if (is_store) { |
| 157 DCHECK(!receiver.is(store_parameter)); | 157 DCHECK(!receiver.is(store_parameter)); |
| 158 DCHECK(!scratch.is(store_parameter)); | 158 DCHECK(!scratch.is(store_parameter)); |
| 159 __ push(store_parameter); | 159 __ push(store_parameter); |
| 160 } | 160 } |
| 161 __ push(scratch); | 161 __ push(scratch); |
| 162 // Stack now matches JSFunction abi. | 162 // Stack now matches JSFunction abi. |
| 163 DCHECK(optimization.is_simple_api_call()); | 163 DCHECK(optimization.is_simple_api_call()); |
| 164 | 164 |
| 165 // Abi for CallApiFunctionStub. | 165 // Abi for CallApiFunctionStub. |
| 166 Register callee = eax; | 166 Register callee = edi; |
| 167 Register data = ebx; | 167 Register data = ebx; |
| 168 Register holder = ecx; | 168 Register holder = ecx; |
| 169 Register api_function_address = edx; | 169 Register api_function_address = edx; |
| 170 scratch = no_reg; | 170 scratch = no_reg; |
| 171 | 171 |
| 172 // Put callee in place. | 172 // Put callee in place. |
| 173 __ LoadAccessor(callee, accessor_holder, accessor_index, | 173 __ LoadAccessor(callee, accessor_holder, accessor_index, |
| 174 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); | 174 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); |
| 175 | 175 |
| 176 // Put holder in place. | 176 // Put holder in place. |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 // Return the generated code. | 766 // Return the generated code. |
| 767 return GetCode(kind(), Code::NORMAL, name); | 767 return GetCode(kind(), Code::NORMAL, name); |
| 768 } | 768 } |
| 769 | 769 |
| 770 | 770 |
| 771 #undef __ | 771 #undef __ |
| 772 } | 772 } |
| 773 } // namespace v8::internal | 773 } // namespace v8::internal |
| 774 | 774 |
| 775 #endif // V8_TARGET_ARCH_X87 | 775 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |