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

Side by Side Diff: src/ic/arm/ic-arm.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/ia32/code-stubs-ia32.cc ('k') | src/ic/arm64/ic-arm64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 r3); 580 r3);
581 __ Ret(); 581 __ Ret();
582 582
583 __ bind(&index_name); 583 __ bind(&index_name);
584 __ IndexFromHash(r3, key); 584 __ IndexFromHash(r3, key);
585 // Now jump to the place where smi keys are handled. 585 // Now jump to the place where smi keys are handled.
586 __ jmp(&index_smi); 586 __ jmp(&index_smi);
587 } 587 }
588 588
589 589
590 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
591 // Return address is in lr.
592 Label miss;
593
594 Register receiver = LoadDescriptor::ReceiverRegister();
595 Register index = LoadDescriptor::NameRegister();
596 Register scratch = r3;
597 Register result = r0;
598 DCHECK(!scratch.is(receiver) && !scratch.is(index));
599
600 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
601 &miss, // When not a string.
602 &miss, // When not a number.
603 &miss, // When index out of range.
604 STRING_INDEX_IS_ARRAY_INDEX);
605 char_at_generator.GenerateFast(masm);
606 __ Ret();
607
608 StubRuntimeCallHelper call_helper;
609 char_at_generator.GenerateSlow(masm, call_helper);
610
611 __ bind(&miss);
612 GenerateMiss(masm);
613 }
614
615
616 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 590 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
617 // Push receiver, key and value for runtime call. 591 // Push receiver, key and value for runtime call.
618 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 592 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
619 StoreDescriptor::ValueRegister()); 593 StoreDescriptor::ValueRegister());
620 594
621 ExternalReference ref = 595 ExternalReference ref =
622 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 596 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
623 __ TailCallExternalReference(ref, 3, 1); 597 __ TailCallExternalReference(ref, 3, 1);
624 } 598 }
625 599
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 patcher.EmitCondition(ne); 984 patcher.EmitCondition(ne);
1011 } else { 985 } else {
1012 DCHECK(Assembler::GetCondition(branch_instr) == ne); 986 DCHECK(Assembler::GetCondition(branch_instr) == ne);
1013 patcher.EmitCondition(eq); 987 patcher.EmitCondition(eq);
1014 } 988 }
1015 } 989 }
1016 } 990 }
1017 } // namespace v8::internal 991 } // namespace v8::internal
1018 992
1019 #endif // V8_TARGET_ARCH_ARM 993 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/arm64/ic-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698