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

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

Issue 1341233002: X87: [stubs] Simplify the non-function case of CallConstructStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months 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/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/compiler.h" 10 #include "src/compiler.h"
(...skipping 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3079 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == 3079 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() ==
3080 expr->CallNewFeedbackSlot().ToInt() + 1); 3080 expr->CallNewFeedbackSlot().ToInt() + 1);
3081 } 3081 }
3082 3082
3083 __ LoadHeapObject(ebx, FeedbackVector()); 3083 __ LoadHeapObject(ebx, FeedbackVector());
3084 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); 3084 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot())));
3085 3085
3086 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3086 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
3087 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3087 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3088 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 3088 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
3089 // Restore context register.
3090 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
3089 context()->Plug(eax); 3091 context()->Plug(eax);
3090 } 3092 }
3091 3093
3092 3094
3093 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 3095 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
3094 SuperCallReference* super_call_ref = 3096 SuperCallReference* super_call_ref =
3095 expr->expression()->AsSuperCallReference(); 3097 expr->expression()->AsSuperCallReference();
3096 DCHECK_NOT_NULL(super_call_ref); 3098 DCHECK_NOT_NULL(super_call_ref);
3097 3099
3098 EmitLoadSuperConstructor(super_call_ref); 3100 EmitLoadSuperConstructor(super_call_ref);
(...skipping 29 matching lines...) Expand all
3128 } 3130 }
3129 3131
3130 __ LoadHeapObject(ebx, FeedbackVector()); 3132 __ LoadHeapObject(ebx, FeedbackVector());
3131 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); 3133 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot())));
3132 3134
3133 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 3135 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
3134 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3136 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3135 3137
3136 RecordJSReturnSite(expr); 3138 RecordJSReturnSite(expr);
3137 3139
3140 // Restore context register.
3141 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
3138 context()->Plug(eax); 3142 context()->Plug(eax);
3139 } 3143 }
3140 3144
3141 3145
3142 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { 3146 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
3143 ZoneList<Expression*>* args = expr->arguments(); 3147 ZoneList<Expression*>* args = expr->arguments();
3144 DCHECK(args->length() == 1); 3148 DCHECK(args->length() == 1);
3145 3149
3146 VisitForAccumulatorValue(args->at(0)); 3150 VisitForAccumulatorValue(args->at(0));
3147 3151
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
3951 __ j(not_zero, &loop); 3955 __ j(not_zero, &loop);
3952 } 3956 }
3953 3957
3954 __ bind(&args_set_up); 3958 __ bind(&args_set_up);
3955 3959
3956 __ mov(edi, Operand(esp, eax, times_pointer_size, 0)); 3960 __ mov(edi, Operand(esp, eax, times_pointer_size, 0));
3957 __ mov(ebx, Immediate(isolate()->factory()->undefined_value())); 3961 __ mov(ebx, Immediate(isolate()->factory()->undefined_value()));
3958 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); 3962 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
3959 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3963 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3960 3964
3961 __ Drop(1); 3965 // Restore context register.
3966 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
3962 3967
3963 context()->Plug(eax); 3968 context()->DropAndPlug(1, eax);
3964 } 3969 }
3965 3970
3966 3971
3967 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { 3972 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) {
3968 // Load the arguments on the stack and call the stub. 3973 // Load the arguments on the stack and call the stub.
3969 RegExpConstructResultStub stub(isolate()); 3974 RegExpConstructResultStub stub(isolate());
3970 ZoneList<Expression*>* args = expr->arguments(); 3975 ZoneList<Expression*>* args = expr->arguments();
3971 DCHECK(args->length() == 3); 3976 DCHECK(args->length() == 3);
3972 VisitForStackValue(args->at(0)); 3977 VisitForStackValue(args->at(0));
3973 VisitForStackValue(args->at(1)); 3978 VisitForStackValue(args->at(1));
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
5140 Assembler::target_address_at(call_target_address, 5145 Assembler::target_address_at(call_target_address,
5141 unoptimized_code)); 5146 unoptimized_code));
5142 return OSR_AFTER_STACK_CHECK; 5147 return OSR_AFTER_STACK_CHECK;
5143 } 5148 }
5144 5149
5145 5150
5146 } // namespace internal 5151 } // namespace internal
5147 } // namespace v8 5152 } // namespace v8
5148 5153
5149 #endif // V8_TARGET_ARCH_X87 5154 #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