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

Side by Side Diff: src/ic/arm64/ic-arm64.cc

Issue 602773003: Eliminate special keyed load string stub in favor of uniform handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/arm/ic-arm.cc ('k') | src/ic/handler-compiler.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 GenerateKeyedLoadWithNameKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow); 621 GenerateKeyedLoadWithNameKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow);
622 622
623 __ Bind(&index_name); 623 __ Bind(&index_name);
624 __ IndexFromHash(x3, key); 624 __ IndexFromHash(x3, key);
625 // Now jump to the place where smi keys are handled. 625 // Now jump to the place where smi keys are handled.
626 __ B(&index_smi); 626 __ B(&index_smi);
627 } 627 }
628 628
629 629
630 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
631 // Return address is in lr.
632 Label miss;
633
634 Register receiver = LoadDescriptor::ReceiverRegister();
635 Register index = LoadDescriptor::NameRegister();
636 Register result = x0;
637 Register scratch = x3;
638 DCHECK(!scratch.is(receiver) && !scratch.is(index));
639
640 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
641 &miss, // When not a string.
642 &miss, // When not a number.
643 &miss, // When index out of range.
644 STRING_INDEX_IS_ARRAY_INDEX);
645 char_at_generator.GenerateFast(masm);
646 __ Ret();
647
648 StubRuntimeCallHelper call_helper;
649 char_at_generator.GenerateSlow(masm, call_helper);
650
651 __ Bind(&miss);
652 GenerateMiss(masm);
653 }
654
655
656 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 630 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
657 ASM_LOCATION("KeyedStoreIC::GenerateMiss"); 631 ASM_LOCATION("KeyedStoreIC::GenerateMiss");
658 632
659 // Push receiver, key and value for runtime call. 633 // Push receiver, key and value for runtime call.
660 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 634 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
661 StoreDescriptor::ValueRegister()); 635 StoreDescriptor::ValueRegister());
662 636
663 ExternalReference ref = 637 ExternalReference ref =
664 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 638 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
665 __ TailCallExternalReference(ref, 3, 1); 639 __ TailCallExternalReference(ref, 3, 1);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 } else { 1004 } else {
1031 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 1005 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
1032 // This is JumpIfSmi(smi_reg, branch_imm). 1006 // This is JumpIfSmi(smi_reg, branch_imm).
1033 patcher.tbz(smi_reg, 0, branch_imm); 1007 patcher.tbz(smi_reg, 0, branch_imm);
1034 } 1008 }
1035 } 1009 }
1036 } 1010 }
1037 } // namespace v8::internal 1011 } // namespace v8::internal
1038 1012
1039 #endif // V8_TARGET_ARCH_ARM64 1013 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm/ic-arm.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698