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

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

Issue 1452213003: PPC: Rename original constructor to new target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | src/ppc/builtins-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/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 ZoneList<Expression*>* args = expr->arguments(); 3113 ZoneList<Expression*>* args = expr->arguments();
3114 int arg_count = args->length(); 3114 int arg_count = args->length();
3115 for (int i = 0; i < arg_count; i++) { 3115 for (int i = 0; i < arg_count; i++) {
3116 VisitForStackValue(args->at(i)); 3116 VisitForStackValue(args->at(i));
3117 } 3117 }
3118 3118
3119 // Call the construct call builtin that handles allocation and 3119 // Call the construct call builtin that handles allocation and
3120 // constructor invocation. 3120 // constructor invocation.
3121 SetConstructCallPosition(expr); 3121 SetConstructCallPosition(expr);
3122 3122
3123 // Load original constructor into r7. 3123 // Load new target into r7.
3124 VisitForAccumulatorValue(super_call_ref->new_target_var()); 3124 VisitForAccumulatorValue(super_call_ref->new_target_var());
3125 __ mr(r7, result_register()); 3125 __ mr(r7, result_register());
3126 3126
3127 // Load function and argument count into r1 and r0. 3127 // Load function and argument count into r1 and r0.
3128 __ mov(r3, Operand(arg_count)); 3128 __ mov(r3, Operand(arg_count));
3129 __ LoadP(r4, MemOperand(sp, arg_count * kPointerSize)); 3129 __ LoadP(r4, MemOperand(sp, arg_count * kPointerSize));
3130 3130
3131 // Record call targets in unoptimized code. 3131 // Record call targets in unoptimized code.
3132 __ EmitLoadTypeFeedbackVector(r5); 3132 __ EmitLoadTypeFeedbackVector(r5);
3133 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackSlot())); 3133 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackSlot()));
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
3851 DCHECK(args->length() == 2); 3851 DCHECK(args->length() == 2);
3852 3852
3853 // Evaluate new.target. 3853 // Evaluate new.target.
3854 VisitForStackValue(args->at(0)); 3854 VisitForStackValue(args->at(0));
3855 3855
3856 // Evaluate super constructor (to stack and r4). 3856 // Evaluate super constructor (to stack and r4).
3857 VisitForAccumulatorValue(args->at(1)); 3857 VisitForAccumulatorValue(args->at(1));
3858 __ push(result_register()); 3858 __ push(result_register());
3859 __ mr(r4, result_register()); 3859 __ mr(r4, result_register());
3860 3860
3861 // Load original constructor into r6. 3861 // Load new target into r6.
3862 __ LoadP(r6, MemOperand(sp, 1 * kPointerSize)); 3862 __ LoadP(r6, MemOperand(sp, 1 * kPointerSize));
3863 3863
3864 // Check if the calling frame is an arguments adaptor frame. 3864 // Check if the calling frame is an arguments adaptor frame.
3865 Label adaptor_frame, args_set_up, runtime; 3865 Label adaptor_frame, args_set_up, runtime;
3866 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3866 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3867 __ LoadP(r7, MemOperand(r5, StandardFrameConstants::kContextOffset)); 3867 __ LoadP(r7, MemOperand(r5, StandardFrameConstants::kContextOffset));
3868 __ CmpSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); 3868 __ CmpSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
3869 __ beq(&adaptor_frame); 3869 __ beq(&adaptor_frame);
3870 3870
3871 // default constructor has no arguments, so no adaptor frame means no args. 3871 // default constructor has no arguments, so no adaptor frame means no args.
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
5041 return ON_STACK_REPLACEMENT; 5041 return ON_STACK_REPLACEMENT;
5042 } 5042 }
5043 5043
5044 DCHECK(interrupt_address == 5044 DCHECK(interrupt_address ==
5045 isolate->builtins()->OsrAfterStackCheck()->entry()); 5045 isolate->builtins()->OsrAfterStackCheck()->entry());
5046 return OSR_AFTER_STACK_CHECK; 5046 return OSR_AFTER_STACK_CHECK;
5047 } 5047 }
5048 } // namespace internal 5048 } // namespace internal
5049 } // namespace v8 5049 } // namespace v8
5050 #endif // V8_TARGET_ARCH_PPC 5050 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« 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