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

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

Issue 1321343004: Desugar %DefaultConstructorCallSuper partially in parser. (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
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 4094 matching lines...) Expand 10 before | Expand all | Expand 10 after
4105 __ bind(&done); 4105 __ bind(&done);
4106 4106
4107 context()->Plug(r3); 4107 context()->Plug(r3);
4108 } 4108 }
4109 4109
4110 4110
4111 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { 4111 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
4112 ZoneList<Expression*>* args = expr->arguments(); 4112 ZoneList<Expression*>* args = expr->arguments();
4113 DCHECK(args->length() == 2); 4113 DCHECK(args->length() == 2);
4114 4114
4115 // new.target 4115 // Evaluate new.target and super constructor.
4116 VisitForStackValue(args->at(0)); 4116 VisitForStackValue(args->at(0));
4117
4118 // .this_function
4119 VisitForStackValue(args->at(1)); 4117 VisitForStackValue(args->at(1));
4120 __ CallRuntime(Runtime::kGetPrototype, 1);
4121 __ mr(r4, result_register());
4122 __ Push(r4);
4123 4118
4124 // Load original constructor into r7. 4119 // Load original constructor into r7.
4125 __ LoadP(r7, MemOperand(sp, 1 * kPointerSize)); 4120 __ LoadP(r7, MemOperand(sp, 1 * kPointerSize));
4126 4121
4127 // Check if the calling frame is an arguments adaptor frame. 4122 // Check if the calling frame is an arguments adaptor frame.
4128 Label adaptor_frame, args_set_up, runtime; 4123 Label adaptor_frame, args_set_up, runtime;
4129 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 4124 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
4130 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset)); 4125 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset));
4131 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); 4126 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
4132 __ beq(&adaptor_frame); 4127 __ beq(&adaptor_frame);
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
5314 return ON_STACK_REPLACEMENT; 5309 return ON_STACK_REPLACEMENT;
5315 } 5310 }
5316 5311
5317 DCHECK(interrupt_address == 5312 DCHECK(interrupt_address ==
5318 isolate->builtins()->OsrAfterStackCheck()->entry()); 5313 isolate->builtins()->OsrAfterStackCheck()->entry());
5319 return OSR_AFTER_STACK_CHECK; 5314 return OSR_AFTER_STACK_CHECK;
5320 } 5315 }
5321 } // namespace internal 5316 } // namespace internal
5322 } // namespace v8 5317 } // namespace v8
5323 #endif // V8_TARGET_ARCH_PPC 5318 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698