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

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

Issue 2378693002: [intrinsics] Nuke the %_StringCharFromCode intrinsic. (Closed)
Patch Set: Created 4 years, 2 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 __ bind(&null); 2775 __ bind(&null);
2776 __ LoadRoot(v0, Heap::kNullValueRootIndex); 2776 __ LoadRoot(v0, Heap::kNullValueRootIndex);
2777 2777
2778 // All done. 2778 // All done.
2779 __ bind(&done); 2779 __ bind(&done);
2780 2780
2781 context()->Plug(v0); 2781 context()->Plug(v0);
2782 } 2782 }
2783 2783
2784 2784
2785 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2786 ZoneList<Expression*>* args = expr->arguments();
2787 DCHECK(args->length() == 1);
2788
2789 VisitForAccumulatorValue(args->at(0));
2790
2791 Label done;
2792 StringCharFromCodeGenerator generator(v0, a1);
2793 generator.GenerateFast(masm_);
2794 __ jmp(&done);
2795
2796 NopRuntimeCallHelper call_helper;
2797 generator.GenerateSlow(masm_, call_helper);
2798
2799 __ bind(&done);
2800 context()->Plug(a1);
2801 }
2802
2803
2804 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { 2785 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) {
2805 ZoneList<Expression*>* args = expr->arguments(); 2786 ZoneList<Expression*>* args = expr->arguments();
2806 DCHECK(args->length() == 2); 2787 DCHECK(args->length() == 2);
2807 2788
2808 VisitForStackValue(args->at(0)); 2789 VisitForStackValue(args->at(0));
2809 VisitForAccumulatorValue(args->at(1)); 2790 VisitForAccumulatorValue(args->at(1));
2810 __ mov(a0, result_register()); 2791 __ mov(a0, result_register());
2811 2792
2812 Register object = a1; 2793 Register object = a1;
2813 Register index = a0; 2794 Register index = a0;
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
3695 reinterpret_cast<uint32_t>( 3676 reinterpret_cast<uint32_t>(
3696 isolate->builtins()->OnStackReplacement()->entry())); 3677 isolate->builtins()->OnStackReplacement()->entry()));
3697 return ON_STACK_REPLACEMENT; 3678 return ON_STACK_REPLACEMENT;
3698 } 3679 }
3699 3680
3700 3681
3701 } // namespace internal 3682 } // namespace internal
3702 } // namespace v8 3683 } // namespace v8
3703 3684
3704 #endif // V8_TARGET_ARCH_MIPS 3685 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698