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

Unified Diff: src/full-codegen/ppc/full-codegen-ppc.cc

Issue 1455563005: PPC: Handle StepIn for constructors through PrepareStep just like for regular calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@patch3
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index 9850f7cf57ef1ed6444cfea6e1d512c37510b7cb..ee7f1b3207a4ec87f27b6802d064710242a37dd7 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -3082,7 +3082,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
- SetConstructCallPosition(expr);
+ SetConstructCallPosition(expr, arg_count);
// Load function and argument count into r4 and r3.
__ mov(r3, Operand(arg_count));
@@ -3118,7 +3118,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
// Call the construct call builtin that handles allocation and
// constructor invocation.
- SetConstructCallPosition(expr);
+ SetConstructCallPosition(expr, arg_count);
// Load new target into r7.
VisitForAccumulatorValue(super_call_ref->new_target_var());
@@ -3850,21 +3850,23 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
DCHECK(args->length() == 2);
- // Evaluate new.target.
+ // Evaluate new.target and super constructor.
VisitForStackValue(args->at(0));
+ VisitForStackValue(args->at(1));
- // Evaluate super constructor (to stack and r4).
- VisitForAccumulatorValue(args->at(1));
- __ push(result_register());
- __ mr(r4, result_register());
-
- // Load new target into r6.
- __ LoadP(r6, MemOperand(sp, 1 * kPointerSize));
+ // Call the construct call builtin that handles allocation and
+ // constructor invocation.
+ SetConstructCallPosition(expr, 0);
// Check if the calling frame is an arguments adaptor frame.
Label adaptor_frame, args_set_up, runtime;
__ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
__ LoadP(r7, MemOperand(r5, StandardFrameConstants::kContextOffset));
+
+ // Load super constructor, new target into r4, r6.
+ __ LoadP(r4, MemOperand(sp));
+ __ LoadP(r6, MemOperand(sp, 1 * kPointerSize));
+
__ CmpSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
__ beq(&adaptor_frame);
« no previous file with comments | « no previous file | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698