| OLD | NEW |
| 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 Loading... |
| 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 // Evaluate new.target and super constructor. | 4115 // Evaluate new.target. |
| 4116 VisitForStackValue(args->at(0)); | 4116 VisitForStackValue(args->at(0)); |
| 4117 VisitForStackValue(args->at(1)); | 4117 |
| 4118 // Evaluate super constructor (to stack and r4). |
| 4119 VisitForAccumulatorValue(args->at(1)); |
| 4120 __ push(result_register()); |
| 4121 __ mr(r4, result_register()); |
| 4118 | 4122 |
| 4119 // Load original constructor into r7. | 4123 // Load original constructor into r7. |
| 4120 __ LoadP(r7, MemOperand(sp, 1 * kPointerSize)); | 4124 __ LoadP(r7, MemOperand(sp, 1 * kPointerSize)); |
| 4121 | 4125 |
| 4122 // Check if the calling frame is an arguments adaptor frame. | 4126 // Check if the calling frame is an arguments adaptor frame. |
| 4123 Label adaptor_frame, args_set_up, runtime; | 4127 Label adaptor_frame, args_set_up, runtime; |
| 4124 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 4128 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 4125 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset)); | 4129 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset)); |
| 4126 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); | 4130 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); |
| 4127 __ beq(&adaptor_frame); | 4131 __ beq(&adaptor_frame); |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5309 return ON_STACK_REPLACEMENT; | 5313 return ON_STACK_REPLACEMENT; |
| 5310 } | 5314 } |
| 5311 | 5315 |
| 5312 DCHECK(interrupt_address == | 5316 DCHECK(interrupt_address == |
| 5313 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5317 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5314 return OSR_AFTER_STACK_CHECK; | 5318 return OSR_AFTER_STACK_CHECK; |
| 5315 } | 5319 } |
| 5316 } // namespace internal | 5320 } // namespace internal |
| 5317 } // namespace v8 | 5321 } // namespace v8 |
| 5318 #endif // V8_TARGET_ARCH_PPC | 5322 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |