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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2894 SetConstructCallPosition(expr, arg_count); | 2894 SetConstructCallPosition(expr, arg_count); |
2895 | 2895 |
2896 // Load function and argument count into edi and eax. | 2896 // Load function and argument count into edi and eax. |
2897 __ Move(eax, Immediate(arg_count)); | 2897 __ Move(eax, Immediate(arg_count)); |
2898 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2898 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
2899 | 2899 |
2900 // Record call targets in unoptimized code. | 2900 // Record call targets in unoptimized code. |
2901 __ EmitLoadTypeFeedbackVector(ebx); | 2901 __ EmitLoadTypeFeedbackVector(ebx); |
2902 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 2902 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
2903 | 2903 |
2904 CallConstructStub stub(isolate()); | 2904 Handle<Code> code = CodeFactory::ConstructIC(isolate()).code(); |
2905 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); | 2905 __ call(code, RelocInfo::CODE_TARGET); |
2906 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2906 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
2907 // Restore context register. | 2907 // Restore context register. |
2908 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2908 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
2909 context()->Plug(eax); | 2909 context()->Plug(eax); |
2910 } | 2910 } |
2911 | 2911 |
2912 | 2912 |
2913 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2913 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
2914 SuperCallReference* super_call_ref = | 2914 SuperCallReference* super_call_ref = |
2915 expr->expression()->AsSuperCallReference(); | 2915 expr->expression()->AsSuperCallReference(); |
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4833 Assembler::target_address_at(call_target_address, | 4833 Assembler::target_address_at(call_target_address, |
4834 unoptimized_code)); | 4834 unoptimized_code)); |
4835 return OSR_AFTER_STACK_CHECK; | 4835 return OSR_AFTER_STACK_CHECK; |
4836 } | 4836 } |
4837 | 4837 |
4838 | 4838 |
4839 } // namespace internal | 4839 } // namespace internal |
4840 } // namespace v8 | 4840 } // namespace v8 |
4841 | 4841 |
4842 #endif // V8_TARGET_ARCH_X87 | 4842 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |