| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2905 | 2905 |
| 2906 // Load function and argument count into edi and eax. | 2906 // Load function and argument count into edi and eax. |
| 2907 __ Move(eax, Immediate(arg_count)); | 2907 __ Move(eax, Immediate(arg_count)); |
| 2908 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2908 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
| 2909 | 2909 |
| 2910 // Record call targets in unoptimized code. | 2910 // Record call targets in unoptimized code. |
| 2911 __ EmitLoadTypeFeedbackVector(ebx); | 2911 __ EmitLoadTypeFeedbackVector(ebx); |
| 2912 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 2912 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 2913 | 2913 |
| 2914 CallConstructStub stub(isolate()); | 2914 CallConstructStub stub(isolate()); |
| 2915 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2915 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); |
| 2916 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2916 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 2917 // Restore context register. | 2917 // Restore context register. |
| 2918 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2918 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 2919 context()->Plug(eax); | 2919 context()->Plug(eax); |
| 2920 } | 2920 } |
| 2921 | 2921 |
| 2922 | 2922 |
| 2923 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2923 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 2924 SuperCallReference* super_call_ref = | 2924 SuperCallReference* super_call_ref = |
| 2925 expr->expression()->AsSuperCallReference(); | 2925 expr->expression()->AsSuperCallReference(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2940 SetConstructCallPosition(expr, arg_count); | 2940 SetConstructCallPosition(expr, arg_count); |
| 2941 | 2941 |
| 2942 // Load new target into edx. | 2942 // Load new target into edx. |
| 2943 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 2943 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 2944 __ mov(edx, result_register()); | 2944 __ mov(edx, result_register()); |
| 2945 | 2945 |
| 2946 // Load function and argument count into edi and eax. | 2946 // Load function and argument count into edi and eax. |
| 2947 __ Move(eax, Immediate(arg_count)); | 2947 __ Move(eax, Immediate(arg_count)); |
| 2948 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2948 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
| 2949 | 2949 |
| 2950 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 2950 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 2951 | 2951 |
| 2952 RecordJSReturnSite(expr); | 2952 RecordJSReturnSite(expr); |
| 2953 | 2953 |
| 2954 // Restore context register. | 2954 // Restore context register. |
| 2955 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2955 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 2956 context()->Plug(eax); | 2956 context()->Plug(eax); |
| 2957 } | 2957 } |
| 2958 | 2958 |
| 2959 | 2959 |
| 2960 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 2960 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3701 __ push(Operand(edx, -1 * kPointerSize)); | 3701 __ push(Operand(edx, -1 * kPointerSize)); |
| 3702 __ sub(edx, Immediate(kPointerSize)); | 3702 __ sub(edx, Immediate(kPointerSize)); |
| 3703 __ dec(ebx); | 3703 __ dec(ebx); |
| 3704 __ j(not_zero, &loop); | 3704 __ j(not_zero, &loop); |
| 3705 } | 3705 } |
| 3706 | 3706 |
| 3707 __ bind(&args_set_up); | 3707 __ bind(&args_set_up); |
| 3708 | 3708 |
| 3709 __ mov(edx, Operand(esp, eax, times_pointer_size, 1 * kPointerSize)); | 3709 __ mov(edx, Operand(esp, eax, times_pointer_size, 1 * kPointerSize)); |
| 3710 __ mov(edi, Operand(esp, eax, times_pointer_size, 0 * kPointerSize)); | 3710 __ mov(edi, Operand(esp, eax, times_pointer_size, 0 * kPointerSize)); |
| 3711 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3711 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 3712 | 3712 |
| 3713 // Restore context register. | 3713 // Restore context register. |
| 3714 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3714 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 3715 | 3715 |
| 3716 context()->DropAndPlug(1, eax); | 3716 context()->DropAndPlug(1, eax); |
| 3717 } | 3717 } |
| 3718 | 3718 |
| 3719 | 3719 |
| 3720 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3720 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
| 3721 ZoneList<Expression*>* args = expr->arguments(); | 3721 ZoneList<Expression*>* args = expr->arguments(); |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4874 Assembler::target_address_at(call_target_address, | 4874 Assembler::target_address_at(call_target_address, |
| 4875 unoptimized_code)); | 4875 unoptimized_code)); |
| 4876 return OSR_AFTER_STACK_CHECK; | 4876 return OSR_AFTER_STACK_CHECK; |
| 4877 } | 4877 } |
| 4878 | 4878 |
| 4879 | 4879 |
| 4880 } // namespace internal | 4880 } // namespace internal |
| 4881 } // namespace v8 | 4881 } // namespace v8 |
| 4882 | 4882 |
| 4883 #endif // V8_TARGET_ARCH_IA32 | 4883 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |