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/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 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 | 2897 |
2898 // Load function and argument count into edi and eax. | 2898 // Load function and argument count into edi and eax. |
2899 __ Move(eax, Immediate(arg_count)); | 2899 __ Move(eax, Immediate(arg_count)); |
2900 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2900 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
2901 | 2901 |
2902 // Record call targets in unoptimized code. | 2902 // Record call targets in unoptimized code. |
2903 __ EmitLoadTypeFeedbackVector(ebx); | 2903 __ EmitLoadTypeFeedbackVector(ebx); |
2904 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 2904 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
2905 | 2905 |
2906 CallConstructStub stub(isolate()); | 2906 CallConstructStub stub(isolate()); |
2907 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2907 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); |
2908 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2908 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
2909 // Restore context register. | 2909 // Restore context register. |
2910 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2910 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
2911 context()->Plug(eax); | 2911 context()->Plug(eax); |
2912 } | 2912 } |
2913 | 2913 |
2914 | 2914 |
2915 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2915 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
2916 SuperCallReference* super_call_ref = | 2916 SuperCallReference* super_call_ref = |
2917 expr->expression()->AsSuperCallReference(); | 2917 expr->expression()->AsSuperCallReference(); |
(...skipping 14 matching lines...) Expand all Loading... |
2932 SetConstructCallPosition(expr, arg_count); | 2932 SetConstructCallPosition(expr, arg_count); |
2933 | 2933 |
2934 // Load new target into edx. | 2934 // Load new target into edx. |
2935 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 2935 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
2936 __ mov(edx, result_register()); | 2936 __ mov(edx, result_register()); |
2937 | 2937 |
2938 // Load function and argument count into edi and eax. | 2938 // Load function and argument count into edi and eax. |
2939 __ Move(eax, Immediate(arg_count)); | 2939 __ Move(eax, Immediate(arg_count)); |
2940 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2940 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
2941 | 2941 |
2942 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 2942 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
2943 | 2943 |
2944 RecordJSReturnSite(expr); | 2944 RecordJSReturnSite(expr); |
2945 | 2945 |
2946 // Restore context register. | 2946 // Restore context register. |
2947 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2947 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
2948 context()->Plug(eax); | 2948 context()->Plug(eax); |
2949 } | 2949 } |
2950 | 2950 |
2951 | 2951 |
2952 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 2952 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3693 __ push(Operand(edx, -1 * kPointerSize)); | 3693 __ push(Operand(edx, -1 * kPointerSize)); |
3694 __ sub(edx, Immediate(kPointerSize)); | 3694 __ sub(edx, Immediate(kPointerSize)); |
3695 __ dec(ebx); | 3695 __ dec(ebx); |
3696 __ j(not_zero, &loop); | 3696 __ j(not_zero, &loop); |
3697 } | 3697 } |
3698 | 3698 |
3699 __ bind(&args_set_up); | 3699 __ bind(&args_set_up); |
3700 | 3700 |
3701 __ mov(edx, Operand(esp, eax, times_pointer_size, 1 * kPointerSize)); | 3701 __ mov(edx, Operand(esp, eax, times_pointer_size, 1 * kPointerSize)); |
3702 __ mov(edi, Operand(esp, eax, times_pointer_size, 0 * kPointerSize)); | 3702 __ mov(edi, Operand(esp, eax, times_pointer_size, 0 * kPointerSize)); |
3703 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3703 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
3704 | 3704 |
3705 // Restore context register. | 3705 // Restore context register. |
3706 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3706 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
3707 | 3707 |
3708 context()->DropAndPlug(1, eax); | 3708 context()->DropAndPlug(1, eax); |
3709 } | 3709 } |
3710 | 3710 |
3711 | 3711 |
3712 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3712 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
3713 ZoneList<Expression*>* args = expr->arguments(); | 3713 ZoneList<Expression*>* args = expr->arguments(); |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4866 Assembler::target_address_at(call_target_address, | 4866 Assembler::target_address_at(call_target_address, |
4867 unoptimized_code)); | 4867 unoptimized_code)); |
4868 return OSR_AFTER_STACK_CHECK; | 4868 return OSR_AFTER_STACK_CHECK; |
4869 } | 4869 } |
4870 | 4870 |
4871 | 4871 |
4872 } // namespace internal | 4872 } // namespace internal |
4873 } // namespace v8 | 4873 } // namespace v8 |
4874 | 4874 |
4875 #endif // V8_TARGET_ARCH_X87 | 4875 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |