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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2885 SetConstructCallPosition(expr, arg_count); | 2885 SetConstructCallPosition(expr, arg_count); |
2886 | 2886 |
2887 // Load function and argument count into rdi and rax. | 2887 // Load function and argument count into rdi and rax. |
2888 __ Set(rax, arg_count); | 2888 __ Set(rax, arg_count); |
2889 __ movp(rdi, Operand(rsp, arg_count * kPointerSize)); | 2889 __ movp(rdi, Operand(rsp, arg_count * kPointerSize)); |
2890 | 2890 |
2891 // Record call targets in unoptimized code, but not in the snapshot. | 2891 // Record call targets in unoptimized code, but not in the snapshot. |
2892 __ EmitLoadTypeFeedbackVector(rbx); | 2892 __ EmitLoadTypeFeedbackVector(rbx); |
2893 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); | 2893 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); |
2894 | 2894 |
2895 CallConstructStub stub(isolate()); | 2895 Handle<Code> code = CodeFactory::ConstructIC(isolate()).code(); |
2896 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); | 2896 __ Call(code, RelocInfo::CODE_TARGET); |
2897 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2897 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
2898 // Restore context register. | 2898 // Restore context register. |
2899 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2899 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2900 context()->Plug(rax); | 2900 context()->Plug(rax); |
2901 } | 2901 } |
2902 | 2902 |
2903 | 2903 |
2904 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2904 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
2905 SuperCallReference* super_call_ref = | 2905 SuperCallReference* super_call_ref = |
2906 expr->expression()->AsSuperCallReference(); | 2906 expr->expression()->AsSuperCallReference(); |
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4879 Assembler::target_address_at(call_target_address, | 4879 Assembler::target_address_at(call_target_address, |
4880 unoptimized_code)); | 4880 unoptimized_code)); |
4881 return OSR_AFTER_STACK_CHECK; | 4881 return OSR_AFTER_STACK_CHECK; |
4882 } | 4882 } |
4883 | 4883 |
4884 | 4884 |
4885 } // namespace internal | 4885 } // namespace internal |
4886 } // namespace v8 | 4886 } // namespace v8 |
4887 | 4887 |
4888 #endif // V8_TARGET_ARCH_X64 | 4888 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |