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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2997 ZoneList<Expression*>* args = expr->arguments(); | 2997 ZoneList<Expression*>* args = expr->arguments(); |
2998 int arg_count = args->length(); | 2998 int arg_count = args->length(); |
2999 for (int i = 0; i < arg_count; i++) { | 2999 for (int i = 0; i < arg_count; i++) { |
3000 VisitForStackValue(args->at(i)); | 3000 VisitForStackValue(args->at(i)); |
3001 } | 3001 } |
3002 | 3002 |
3003 // Call the construct call builtin that handles allocation and | 3003 // Call the construct call builtin that handles allocation and |
3004 // constructor invocation. | 3004 // constructor invocation. |
3005 SetConstructCallPosition(expr); | 3005 SetConstructCallPosition(expr); |
3006 | 3006 |
3007 // Load original constructor into rcx. | 3007 // Load new target into rcx. |
3008 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3008 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
3009 __ movp(rcx, result_register()); | 3009 __ movp(rcx, result_register()); |
3010 | 3010 |
3011 // Load function and argument count into rdi and rax. | 3011 // Load function and argument count into rdi and rax. |
3012 __ Set(rax, arg_count); | 3012 __ Set(rax, arg_count); |
3013 __ movp(rdi, Operand(rsp, arg_count * kPointerSize)); | 3013 __ movp(rdi, Operand(rsp, arg_count * kPointerSize)); |
3014 | 3014 |
3015 // Record call targets in unoptimized code. | 3015 // Record call targets in unoptimized code. |
3016 __ EmitLoadTypeFeedbackVector(rbx); | 3016 __ EmitLoadTypeFeedbackVector(rbx); |
3017 __ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot())); | 3017 __ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot())); |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4975 Assembler::target_address_at(call_target_address, | 4975 Assembler::target_address_at(call_target_address, |
4976 unoptimized_code)); | 4976 unoptimized_code)); |
4977 return OSR_AFTER_STACK_CHECK; | 4977 return OSR_AFTER_STACK_CHECK; |
4978 } | 4978 } |
4979 | 4979 |
4980 | 4980 |
4981 } // namespace internal | 4981 } // namespace internal |
4982 } // namespace v8 | 4982 } // namespace v8 |
4983 | 4983 |
4984 #endif // V8_TARGET_ARCH_X64 | 4984 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |