| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2904 // And "return" to the OSR entry point of the function. | 2897 // And "return" to the OSR entry point of the function. |
| 2905 __ ret(0); | 2898 __ ret(0); |
| 2906 } | 2899 } |
| 2907 | 2900 |
| 2908 | 2901 |
| 2909 #undef __ | 2902 #undef __ |
| 2910 } // namespace internal | 2903 } // namespace internal |
| 2911 } // namespace v8 | 2904 } // namespace v8 |
| 2912 | 2905 |
| 2913 #endif // V8_TARGET_ARCH_X87 | 2906 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |