Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 1491063003: X87: Provide call counts for constructor calls, surface them as a vector IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 SetConstructCallPosition(expr, arg_count); 2894 SetConstructCallPosition(expr, arg_count);
2895 2895
2896 // Load function and argument count into edi and eax. 2896 // Load function and argument count into edi and eax.
2897 __ Move(eax, Immediate(arg_count)); 2897 __ Move(eax, Immediate(arg_count));
2898 __ mov(edi, Operand(esp, arg_count * kPointerSize)); 2898 __ mov(edi, Operand(esp, arg_count * kPointerSize));
2899 2899
2900 // Record call targets in unoptimized code. 2900 // Record call targets in unoptimized code.
2901 __ EmitLoadTypeFeedbackVector(ebx); 2901 __ EmitLoadTypeFeedbackVector(ebx);
2902 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); 2902 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot())));
2903 2903
2904 CallConstructStub stub(isolate()); 2904 Handle<Code> code = CodeFactory::ConstructIC(isolate()).code();
2905 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); 2905 __ call(code, RelocInfo::CODE_TARGET);
2906 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2906 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
2907 // Restore context register. 2907 // Restore context register.
2908 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 2908 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2909 context()->Plug(eax); 2909 context()->Plug(eax);
2910 } 2910 }
2911 2911
2912 2912
2913 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 2913 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
2914 SuperCallReference* super_call_ref = 2914 SuperCallReference* super_call_ref =
2915 expr->expression()->AsSuperCallReference(); 2915 expr->expression()->AsSuperCallReference();
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after
4833 Assembler::target_address_at(call_target_address, 4833 Assembler::target_address_at(call_target_address,
4834 unoptimized_code)); 4834 unoptimized_code));
4835 return OSR_AFTER_STACK_CHECK; 4835 return OSR_AFTER_STACK_CHECK;
4836 } 4836 }
4837 4837
4838 4838
4839 } // namespace internal 4839 } // namespace internal
4840 } // namespace v8 4840 } // namespace v8
4841 4841
4842 #endif // V8_TARGET_ARCH_X87 4842 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698