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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (is_store) { | 155 if (is_store) { |
156 DCHECK(!receiver.is(store_parameter)); | 156 DCHECK(!receiver.is(store_parameter)); |
157 DCHECK(!scratch_in.is(store_parameter)); | 157 DCHECK(!scratch_in.is(store_parameter)); |
158 __ push(store_parameter); | 158 __ push(store_parameter); |
159 } | 159 } |
160 __ push(scratch_in); | 160 __ push(scratch_in); |
161 // Stack now matches JSFunction abi. | 161 // Stack now matches JSFunction abi. |
162 DCHECK(optimization.is_simple_api_call()); | 162 DCHECK(optimization.is_simple_api_call()); |
163 | 163 |
164 // Abi for CallApiFunctionStub. | 164 // Abi for CallApiFunctionStub. |
165 Register callee = eax; | 165 Register callee = edi; |
166 Register call_data = ebx; | 166 Register call_data = ebx; |
167 Register holder = ecx; | 167 Register holder = ecx; |
168 Register api_function_address = edx; | 168 Register api_function_address = edx; |
169 Register scratch = edi; // scratch_in is no longer valid. | 169 Register scratch = eax; // scratch_in is no longer valid. |
170 | 170 |
171 // Put holder in place. | 171 // Put holder in place. |
172 CallOptimization::HolderLookup holder_lookup; | 172 CallOptimization::HolderLookup holder_lookup; |
173 Handle<JSObject> api_holder = | 173 Handle<JSObject> api_holder = |
174 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); | 174 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); |
175 switch (holder_lookup) { | 175 switch (holder_lookup) { |
176 case CallOptimization::kHolderIsReceiver: | 176 case CallOptimization::kHolderIsReceiver: |
177 __ Move(holder, receiver); | 177 __ Move(holder, receiver); |
178 break; | 178 break; |
179 case CallOptimization::kHolderFound: | 179 case CallOptimization::kHolderFound: |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 // Return the generated code. | 760 // Return the generated code. |
761 return GetCode(kind(), Code::NORMAL, name); | 761 return GetCode(kind(), Code::NORMAL, name); |
762 } | 762 } |
763 | 763 |
764 | 764 |
765 #undef __ | 765 #undef __ |
766 } | 766 } |
767 } // namespace v8::internal | 767 } // namespace v8::internal |
768 | 768 |
769 #endif // V8_TARGET_ARCH_IA32 | 769 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |