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/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 2987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2998 ZoneList<Expression*>* args = expr->arguments(); | 2998 ZoneList<Expression*>* args = expr->arguments(); |
2999 int arg_count = args->length(); | 2999 int arg_count = args->length(); |
3000 for (int i = 0; i < arg_count; i++) { | 3000 for (int i = 0; i < arg_count; i++) { |
3001 VisitForStackValue(args->at(i)); | 3001 VisitForStackValue(args->at(i)); |
3002 } | 3002 } |
3003 | 3003 |
3004 // Call the construct call builtin that handles allocation and | 3004 // Call the construct call builtin that handles allocation and |
3005 // constructor invocation. | 3005 // constructor invocation. |
3006 SetConstructCallPosition(expr); | 3006 SetConstructCallPosition(expr); |
3007 | 3007 |
3008 // Load original constructor into ecx. | 3008 // Load new target into ecx. |
3009 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3009 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
3010 __ mov(ecx, result_register()); | 3010 __ mov(ecx, result_register()); |
3011 | 3011 |
3012 // Load function and argument count into edi and eax. | 3012 // Load function and argument count into edi and eax. |
3013 __ Move(eax, Immediate(arg_count)); | 3013 __ Move(eax, Immediate(arg_count)); |
3014 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 3014 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
3015 | 3015 |
3016 // Record call targets in unoptimized code. | 3016 // Record call targets in unoptimized code. |
3017 __ EmitLoadTypeFeedbackVector(ebx); | 3017 __ EmitLoadTypeFeedbackVector(ebx); |
3018 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); | 3018 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); |
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4951 Assembler::target_address_at(call_target_address, | 4951 Assembler::target_address_at(call_target_address, |
4952 unoptimized_code)); | 4952 unoptimized_code)); |
4953 return OSR_AFTER_STACK_CHECK; | 4953 return OSR_AFTER_STACK_CHECK; |
4954 } | 4954 } |
4955 | 4955 |
4956 | 4956 |
4957 } // namespace internal | 4957 } // namespace internal |
4958 } // namespace v8 | 4958 } // namespace v8 |
4959 | 4959 |
4960 #endif // V8_TARGET_ARCH_X87 | 4960 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |