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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 ZoneList<Expression*>* args = expr->arguments(); | 3006 ZoneList<Expression*>* args = expr->arguments(); |
3007 int arg_count = args->length(); | 3007 int arg_count = args->length(); |
3008 for (int i = 0; i < arg_count; i++) { | 3008 for (int i = 0; i < arg_count; i++) { |
3009 VisitForStackValue(args->at(i)); | 3009 VisitForStackValue(args->at(i)); |
3010 } | 3010 } |
3011 | 3011 |
3012 // Call the construct call builtin that handles allocation and | 3012 // Call the construct call builtin that handles allocation and |
3013 // constructor invocation. | 3013 // constructor invocation. |
3014 SetConstructCallPosition(expr); | 3014 SetConstructCallPosition(expr); |
3015 | 3015 |
3016 // Load original constructor into ecx. | 3016 // Load new target into ecx. |
3017 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3017 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
3018 __ mov(ecx, result_register()); | 3018 __ mov(ecx, result_register()); |
3019 | 3019 |
3020 // Load function and argument count into edi and eax. | 3020 // Load function and argument count into edi and eax. |
3021 __ Move(eax, Immediate(arg_count)); | 3021 __ Move(eax, Immediate(arg_count)); |
3022 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 3022 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
3023 | 3023 |
3024 // Record call targets in unoptimized code. | 3024 // Record call targets in unoptimized code. |
3025 __ EmitLoadTypeFeedbackVector(ebx); | 3025 __ EmitLoadTypeFeedbackVector(ebx); |
3026 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); | 3026 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); |
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4959 Assembler::target_address_at(call_target_address, | 4959 Assembler::target_address_at(call_target_address, |
4960 unoptimized_code)); | 4960 unoptimized_code)); |
4961 return OSR_AFTER_STACK_CHECK; | 4961 return OSR_AFTER_STACK_CHECK; |
4962 } | 4962 } |
4963 | 4963 |
4964 | 4964 |
4965 } // namespace internal | 4965 } // namespace internal |
4966 } // namespace v8 | 4966 } // namespace v8 |
4967 | 4967 |
4968 #endif // V8_TARGET_ARCH_IA32 | 4968 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |