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

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

Issue 1335723002: [stubs] Simplify the non-function case of CallConstructStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's comment. 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 | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/code-stubs-ia32.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_X64 5 #if V8_TARGET_ARCH_X64
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 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == 3113 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() ==
3114 expr->CallNewFeedbackSlot().ToInt() + 1); 3114 expr->CallNewFeedbackSlot().ToInt() + 1);
3115 } 3115 }
3116 3116
3117 __ Move(rbx, FeedbackVector()); 3117 __ Move(rbx, FeedbackVector());
3118 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); 3118 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot()));
3119 3119
3120 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3120 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
3121 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3121 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3122 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 3122 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
3123 // Restore context register.
3124 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
3123 context()->Plug(rax); 3125 context()->Plug(rax);
3124 } 3126 }
3125 3127
3126 3128
3127 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 3129 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
3128 SuperCallReference* super_call_ref = 3130 SuperCallReference* super_call_ref =
3129 expr->expression()->AsSuperCallReference(); 3131 expr->expression()->AsSuperCallReference();
3130 DCHECK_NOT_NULL(super_call_ref); 3132 DCHECK_NOT_NULL(super_call_ref);
3131 3133
3132 EmitLoadSuperConstructor(super_call_ref); 3134 EmitLoadSuperConstructor(super_call_ref);
(...skipping 29 matching lines...) Expand all
3162 } 3164 }
3163 3165
3164 __ Move(rbx, FeedbackVector()); 3166 __ Move(rbx, FeedbackVector());
3165 __ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot())); 3167 __ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot()));
3166 3168
3167 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 3169 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
3168 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3170 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3169 3171
3170 RecordJSReturnSite(expr); 3172 RecordJSReturnSite(expr);
3171 3173
3174 // Restore context register.
3175 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
3176
3172 context()->Plug(rax); 3177 context()->Plug(rax);
3173 } 3178 }
3174 3179
3175 3180
3176 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { 3181 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
3177 ZoneList<Expression*>* args = expr->arguments(); 3182 ZoneList<Expression*>* args = expr->arguments();
3178 DCHECK(args->length() == 1); 3183 DCHECK(args->length() == 1);
3179 3184
3180 VisitForAccumulatorValue(args->at(0)); 3185 VisitForAccumulatorValue(args->at(0));
3181 3186
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 __ j(not_zero, &loop); 4079 __ j(not_zero, &loop);
4075 } 4080 }
4076 4081
4077 __ bind(&args_set_up); 4082 __ bind(&args_set_up);
4078 __ movp(rdi, Operand(rsp, rax, times_pointer_size, 0)); 4083 __ movp(rdi, Operand(rsp, rax, times_pointer_size, 0));
4079 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); 4084 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
4080 4085
4081 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); 4086 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
4082 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 4087 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
4083 4088
4084 __ Drop(1); 4089 // Restore context register.
4090 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
4085 4091
4086 context()->Plug(result_register()); 4092 context()->DropAndPlug(1, rax);
4087 } 4093 }
4088 4094
4089 4095
4090 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { 4096 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) {
4091 RegExpConstructResultStub stub(isolate()); 4097 RegExpConstructResultStub stub(isolate());
4092 ZoneList<Expression*>* args = expr->arguments(); 4098 ZoneList<Expression*>* args = expr->arguments();
4093 DCHECK(args->length() == 3); 4099 DCHECK(args->length() == 3);
4094 VisitForStackValue(args->at(0)); 4100 VisitForStackValue(args->at(0));
4095 VisitForStackValue(args->at(1)); 4101 VisitForStackValue(args->at(1));
4096 VisitForAccumulatorValue(args->at(2)); 4102 VisitForAccumulatorValue(args->at(2));
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
5283 Assembler::target_address_at(call_target_address, 5289 Assembler::target_address_at(call_target_address,
5284 unoptimized_code)); 5290 unoptimized_code));
5285 return OSR_AFTER_STACK_CHECK; 5291 return OSR_AFTER_STACK_CHECK;
5286 } 5292 }
5287 5293
5288 5294
5289 } // namespace internal 5295 } // namespace internal
5290 } // namespace v8 5296 } // namespace v8
5291 5297
5292 #endif // V8_TARGET_ARCH_X64 5298 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698