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

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

Issue 1338663003: PPC: [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/ppc/code-stubs-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == 3187 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() ==
3188 expr->CallNewFeedbackSlot().ToInt() + 1); 3188 expr->CallNewFeedbackSlot().ToInt() + 1);
3189 } 3189 }
3190 3190
3191 __ Move(r5, FeedbackVector()); 3191 __ Move(r5, FeedbackVector());
3192 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallNewFeedbackSlot())); 3192 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallNewFeedbackSlot()));
3193 3193
3194 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3194 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
3195 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3195 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3196 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 3196 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
3197 // Restore context register.
3198 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3197 context()->Plug(r3); 3199 context()->Plug(r3);
3198 } 3200 }
3199 3201
3200 3202
3201 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 3203 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
3202 SuperCallReference* super_call_ref = 3204 SuperCallReference* super_call_ref =
3203 expr->expression()->AsSuperCallReference(); 3205 expr->expression()->AsSuperCallReference();
3204 DCHECK_NOT_NULL(super_call_ref); 3206 DCHECK_NOT_NULL(super_call_ref);
3205 3207
3206 EmitLoadSuperConstructor(super_call_ref); 3208 EmitLoadSuperConstructor(super_call_ref);
(...skipping 29 matching lines...) Expand all
3236 } 3238 }
3237 3239
3238 __ Move(r5, FeedbackVector()); 3240 __ Move(r5, FeedbackVector());
3239 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackSlot())); 3241 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackSlot()));
3240 3242
3241 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 3243 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
3242 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3244 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3243 3245
3244 RecordJSReturnSite(expr); 3246 RecordJSReturnSite(expr);
3245 3247
3248 // Restore context register.
3249 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3246 context()->Plug(r3); 3250 context()->Plug(r3);
3247 } 3251 }
3248 3252
3249 3253
3250 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { 3254 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
3251 ZoneList<Expression*>* args = expr->arguments(); 3255 ZoneList<Expression*>* args = expr->arguments();
3252 DCHECK(args->length() == 1); 3256 DCHECK(args->length() == 1);
3253 3257
3254 VisitForAccumulatorValue(args->at(0)); 3258 VisitForAccumulatorValue(args->at(0));
3255 3259
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
4150 __ Push(r6); 4154 __ Push(r6);
4151 __ bdnz(&loop); 4155 __ bdnz(&loop);
4152 } 4156 }
4153 4157
4154 __ bind(&args_set_up); 4158 __ bind(&args_set_up);
4155 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); 4159 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
4156 4160
4157 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); 4161 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
4158 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 4162 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
4159 4163
4160 __ Drop(1); 4164 // Restore context register.
4165 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
4161 4166
4162 context()->Plug(result_register()); 4167 context()->DropAndPlug(1, r3);
4163 } 4168 }
4164 4169
4165 4170
4166 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { 4171 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) {
4167 RegExpConstructResultStub stub(isolate()); 4172 RegExpConstructResultStub stub(isolate());
4168 ZoneList<Expression*>* args = expr->arguments(); 4173 ZoneList<Expression*>* args = expr->arguments();
4169 DCHECK(args->length() == 3); 4174 DCHECK(args->length() == 3);
4170 VisitForStackValue(args->at(0)); 4175 VisitForStackValue(args->at(0));
4171 VisitForStackValue(args->at(1)); 4176 VisitForStackValue(args->at(1));
4172 VisitForAccumulatorValue(args->at(2)); 4177 VisitForAccumulatorValue(args->at(2));
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
5310 return ON_STACK_REPLACEMENT; 5315 return ON_STACK_REPLACEMENT;
5311 } 5316 }
5312 5317
5313 DCHECK(interrupt_address == 5318 DCHECK(interrupt_address ==
5314 isolate->builtins()->OsrAfterStackCheck()->entry()); 5319 isolate->builtins()->OsrAfterStackCheck()->entry());
5315 return OSR_AFTER_STACK_CHECK; 5320 return OSR_AFTER_STACK_CHECK;
5316 } 5321 }
5317 } // namespace internal 5322 } // namespace internal
5318 } // namespace v8 5323 } // namespace v8
5319 #endif // V8_TARGET_ARCH_PPC 5324 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698