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/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2771 __ bind(&null); | 2771 __ bind(&null); |
2772 __ LoadRoot(r3, Heap::kNullValueRootIndex); | 2772 __ LoadRoot(r3, Heap::kNullValueRootIndex); |
2773 | 2773 |
2774 // All done. | 2774 // All done. |
2775 __ bind(&done); | 2775 __ bind(&done); |
2776 | 2776 |
2777 context()->Plug(r3); | 2777 context()->Plug(r3); |
2778 } | 2778 } |
2779 | 2779 |
2780 | 2780 |
2781 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | |
2782 ZoneList<Expression*>* args = expr->arguments(); | |
2783 DCHECK(args->length() == 1); | |
2784 VisitForAccumulatorValue(args->at(0)); | |
2785 | |
2786 Label done; | |
2787 StringCharFromCodeGenerator generator(r3, r4); | |
2788 generator.GenerateFast(masm_); | |
2789 __ b(&done); | |
2790 | |
2791 NopRuntimeCallHelper call_helper; | |
2792 generator.GenerateSlow(masm_, call_helper); | |
2793 | |
2794 __ bind(&done); | |
2795 context()->Plug(r4); | |
2796 } | |
2797 | |
2798 | |
2799 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { | 2781 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { |
2800 ZoneList<Expression*>* args = expr->arguments(); | 2782 ZoneList<Expression*>* args = expr->arguments(); |
2801 DCHECK(args->length() == 2); | 2783 DCHECK(args->length() == 2); |
2802 VisitForStackValue(args->at(0)); | 2784 VisitForStackValue(args->at(0)); |
2803 VisitForAccumulatorValue(args->at(1)); | 2785 VisitForAccumulatorValue(args->at(1)); |
2804 | 2786 |
2805 Register object = r4; | 2787 Register object = r4; |
2806 Register index = r3; | 2788 Register index = r3; |
2807 Register result = r6; | 2789 Register result = r6; |
2808 | 2790 |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3678 | 3660 |
3679 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3661 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3680 | 3662 |
3681 DCHECK(interrupt_address == | 3663 DCHECK(interrupt_address == |
3682 isolate->builtins()->OnStackReplacement()->entry()); | 3664 isolate->builtins()->OnStackReplacement()->entry()); |
3683 return ON_STACK_REPLACEMENT; | 3665 return ON_STACK_REPLACEMENT; |
3684 } | 3666 } |
3685 } // namespace internal | 3667 } // namespace internal |
3686 } // namespace v8 | 3668 } // namespace v8 |
3687 #endif // V8_TARGET_ARCH_PPC | 3669 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |