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/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('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 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_X87 5 #if V8_TARGET_ARCH_X87
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 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 __ bind(&non_function_constructor); 2648 __ bind(&non_function_constructor);
2649 __ mov(eax, isolate()->factory()->Object_string()); 2649 __ mov(eax, isolate()->factory()->Object_string());
2650 2650
2651 // All done. 2651 // All done.
2652 __ bind(&done); 2652 __ bind(&done);
2653 2653
2654 context()->Plug(eax); 2654 context()->Plug(eax);
2655 } 2655 }
2656 2656
2657 2657
2658 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2659 ZoneList<Expression*>* args = expr->arguments();
2660 DCHECK(args->length() == 1);
2661
2662 VisitForAccumulatorValue(args->at(0));
2663
2664 Label done;
2665 StringCharFromCodeGenerator generator(eax, ebx);
2666 generator.GenerateFast(masm_);
2667 __ jmp(&done);
2668
2669 NopRuntimeCallHelper call_helper;
2670 generator.GenerateSlow(masm_, call_helper);
2671
2672 __ bind(&done);
2673 context()->Plug(ebx);
2674 }
2675
2676
2677 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { 2658 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) {
2678 ZoneList<Expression*>* args = expr->arguments(); 2659 ZoneList<Expression*>* args = expr->arguments();
2679 DCHECK(args->length() == 2); 2660 DCHECK(args->length() == 2);
2680 2661
2681 VisitForStackValue(args->at(0)); 2662 VisitForStackValue(args->at(0));
2682 VisitForAccumulatorValue(args->at(1)); 2663 VisitForAccumulatorValue(args->at(1));
2683 2664
2684 Register object = ebx; 2665 Register object = ebx;
2685 Register index = eax; 2666 Register index = eax;
2686 Register result = edx; 2667 Register result = edx;
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
3577 isolate->builtins()->OnStackReplacement()->entry(), 3558 isolate->builtins()->OnStackReplacement()->entry(),
3578 Assembler::target_address_at(call_target_address, unoptimized_code)); 3559 Assembler::target_address_at(call_target_address, unoptimized_code));
3579 return ON_STACK_REPLACEMENT; 3560 return ON_STACK_REPLACEMENT;
3580 } 3561 }
3581 3562
3582 3563
3583 } // namespace internal 3564 } // namespace internal
3584 } // namespace v8 3565 } // namespace v8
3585 3566
3586 #endif // V8_TARGET_ARCH_X87 3567 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698