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/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 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2902 SetConstructCallPosition(expr, arg_count); | 2902 SetConstructCallPosition(expr, arg_count); |
2903 | 2903 |
2904 // Load function and argument count into edi and eax. | 2904 // Load function and argument count into edi and eax. |
2905 __ Move(eax, Immediate(arg_count)); | 2905 __ Move(eax, Immediate(arg_count)); |
2906 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2906 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
2907 | 2907 |
2908 // Record call targets in unoptimized code. | 2908 // Record call targets in unoptimized code. |
2909 __ EmitLoadTypeFeedbackVector(ebx); | 2909 __ EmitLoadTypeFeedbackVector(ebx); |
2910 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 2910 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
2911 | 2911 |
2912 Handle<Code> code = CodeFactory::ConstructIC(isolate()).code(); | 2912 CallConstructStub stub(isolate()); |
2913 __ call(code, RelocInfo::CODE_TARGET); | 2913 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); |
2914 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2914 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
2915 // Restore context register. | 2915 // Restore context register. |
2916 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2916 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
2917 context()->Plug(eax); | 2917 context()->Plug(eax); |
2918 } | 2918 } |
2919 | 2919 |
2920 | 2920 |
2921 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2921 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
2922 SuperCallReference* super_call_ref = | 2922 SuperCallReference* super_call_ref = |
2923 expr->expression()->AsSuperCallReference(); | 2923 expr->expression()->AsSuperCallReference(); |
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4872 Assembler::target_address_at(call_target_address, | 4872 Assembler::target_address_at(call_target_address, |
4873 unoptimized_code)); | 4873 unoptimized_code)); |
4874 return OSR_AFTER_STACK_CHECK; | 4874 return OSR_AFTER_STACK_CHECK; |
4875 } | 4875 } |
4876 | 4876 |
4877 | 4877 |
4878 } // namespace internal | 4878 } // namespace internal |
4879 } // namespace v8 | 4879 } // namespace v8 |
4880 | 4880 |
4881 #endif // V8_TARGET_ARCH_IA32 | 4881 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |