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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 __ Bind(&null); 2678 __ Bind(&null);
2679 __ LoadRoot(x0, Heap::kNullValueRootIndex); 2679 __ LoadRoot(x0, Heap::kNullValueRootIndex);
2680 2680
2681 // All done. 2681 // All done.
2682 __ Bind(&done); 2682 __ Bind(&done);
2683 2683
2684 context()->Plug(x0); 2684 context()->Plug(x0);
2685 } 2685 }
2686 2686
2687 2687
2688 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2689 ZoneList<Expression*>* args = expr->arguments();
2690 DCHECK(args->length() == 1);
2691
2692 VisitForAccumulatorValue(args->at(0));
2693
2694 Label done;
2695 Register code = x0;
2696 Register result = x1;
2697
2698 StringCharFromCodeGenerator generator(code, result);
2699 generator.GenerateFast(masm_);
2700 __ B(&done);
2701
2702 NopRuntimeCallHelper call_helper;
2703 generator.GenerateSlow(masm_, call_helper);
2704
2705 __ Bind(&done);
2706 context()->Plug(result);
2707 }
2708
2709
2710 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { 2688 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) {
2711 ZoneList<Expression*>* args = expr->arguments(); 2689 ZoneList<Expression*>* args = expr->arguments();
2712 DCHECK(args->length() == 2); 2690 DCHECK(args->length() == 2);
2713 2691
2714 VisitForStackValue(args->at(0)); 2692 VisitForStackValue(args->at(0));
2715 VisitForAccumulatorValue(args->at(1)); 2693 VisitForAccumulatorValue(args->at(1));
2716 2694
2717 Register object = x1; 2695 Register object = x1;
2718 Register index = x0; 2696 Register index = x0;
2719 Register result = x3; 2697 Register result = x3;
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
3764 } 3742 }
3765 3743
3766 return INTERRUPT; 3744 return INTERRUPT;
3767 } 3745 }
3768 3746
3769 3747
3770 } // namespace internal 3748 } // namespace internal
3771 } // namespace v8 3749 } // namespace v8
3772 3750
3773 #endif // V8_TARGET_ARCH_ARM64 3751 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698