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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 Label loop, entry; | 179 Label loop, entry; |
180 __ mov(ecx, eax); | 180 __ mov(ecx, eax); |
181 __ jmp(&entry); | 181 __ jmp(&entry); |
182 __ bind(&loop); | 182 __ bind(&loop); |
183 __ push(Operand(ebx, ecx, times_4, 0)); | 183 __ push(Operand(ebx, ecx, times_4, 0)); |
184 __ bind(&entry); | 184 __ bind(&entry); |
185 __ dec(ecx); | 185 __ dec(ecx); |
186 __ j(greater_equal, &loop); | 186 __ j(greater_equal, &loop); |
187 | 187 |
188 // Call the function. | 188 // Call the function. |
189 if (is_api_function) { | 189 ParameterCount actual(eax); |
190 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 190 __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, |
191 Handle<Code> code = | 191 CheckDebugStepCallWrapper()); |
192 masm->isolate()->builtins()->HandleApiCallConstruct(); | |
193 __ call(code, RelocInfo::CODE_TARGET); | |
194 } else { | |
195 ParameterCount actual(eax); | |
196 __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, | |
197 CheckDebugStepCallWrapper()); | |
198 } | |
199 | 192 |
200 // Store offset of return address for deoptimizer. | 193 // Store offset of return address for deoptimizer. |
201 if (create_implicit_receiver && !is_api_function) { | 194 if (create_implicit_receiver && !is_api_function) { |
202 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 195 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
203 } | 196 } |
204 | 197 |
205 // Restore context from the frame. | 198 // Restore context from the frame. |
206 __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); | 199 __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); |
207 | 200 |
208 if (create_implicit_receiver) { | 201 if (create_implicit_receiver) { |
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2874 // And "return" to the OSR entry point of the function. | 2867 // And "return" to the OSR entry point of the function. |
2875 __ ret(0); | 2868 __ ret(0); |
2876 } | 2869 } |
2877 | 2870 |
2878 | 2871 |
2879 #undef __ | 2872 #undef __ |
2880 } // namespace internal | 2873 } // namespace internal |
2881 } // namespace v8 | 2874 } // namespace v8 |
2882 | 2875 |
2883 #endif // V8_TARGET_ARCH_IA32 | 2876 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |