| 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 3762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3773 // overwritten by the write barrier code and is needed afterward. | 3773 // overwritten by the write barrier code and is needed afterward. |
| 3774 __ mr(r5, r3); | 3774 __ mr(r5, r3); |
| 3775 __ RecordWriteField(r4, JSValue::kValueOffset, r5, r6, kLRHasBeenSaved, | 3775 __ RecordWriteField(r4, JSValue::kValueOffset, r5, r6, kLRHasBeenSaved, |
| 3776 kDontSaveFPRegs); | 3776 kDontSaveFPRegs); |
| 3777 | 3777 |
| 3778 __ bind(&done); | 3778 __ bind(&done); |
| 3779 context()->Plug(r3); | 3779 context()->Plug(r3); |
| 3780 } | 3780 } |
| 3781 | 3781 |
| 3782 | 3782 |
| 3783 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |
| 3784 ZoneList<Expression*>* args = expr->arguments(); |
| 3785 DCHECK_EQ(1, args->length()); |
| 3786 |
| 3787 // Load the argument into r3 and convert it. |
| 3788 VisitForAccumulatorValue(args->at(0)); |
| 3789 |
| 3790 // Convert the object to an integer. |
| 3791 Label done_convert; |
| 3792 __ JumpIfSmi(r3, &done_convert); |
| 3793 __ Push(r3); |
| 3794 __ CallRuntime(Runtime::kToInteger, 1); |
| 3795 __ bind(&done_convert); |
| 3796 context()->Plug(r3); |
| 3797 } |
| 3798 |
| 3799 |
| 3783 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { | 3800 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
| 3784 ZoneList<Expression*>* args = expr->arguments(); | 3801 ZoneList<Expression*>* args = expr->arguments(); |
| 3785 DCHECK_EQ(args->length(), 1); | 3802 DCHECK_EQ(args->length(), 1); |
| 3786 // Load the argument into r3 and call the stub. | 3803 // Load the argument into r3 and call the stub. |
| 3787 VisitForAccumulatorValue(args->at(0)); | 3804 VisitForAccumulatorValue(args->at(0)); |
| 3788 | 3805 |
| 3789 NumberToStringStub stub(isolate()); | 3806 NumberToStringStub stub(isolate()); |
| 3790 __ CallStub(&stub); | 3807 __ CallStub(&stub); |
| 3791 context()->Plug(r3); | 3808 context()->Plug(r3); |
| 3792 } | 3809 } |
| (...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5206 return ON_STACK_REPLACEMENT; | 5223 return ON_STACK_REPLACEMENT; |
| 5207 } | 5224 } |
| 5208 | 5225 |
| 5209 DCHECK(interrupt_address == | 5226 DCHECK(interrupt_address == |
| 5210 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5227 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5211 return OSR_AFTER_STACK_CHECK; | 5228 return OSR_AFTER_STACK_CHECK; |
| 5212 } | 5229 } |
| 5213 } // namespace internal | 5230 } // namespace internal |
| 5214 } // namespace v8 | 5231 } // namespace v8 |
| 5215 #endif // V8_TARGET_ARCH_PPC | 5232 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |