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/ic/mips/ic-mips.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/ic-compiler.cc ('k') | src/ic/x64/ic-x64.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 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 a3); 587 a3);
588 __ Ret(); 588 __ Ret();
589 589
590 __ bind(&index_name); 590 __ bind(&index_name);
591 __ IndexFromHash(a3, key); 591 __ IndexFromHash(a3, key);
592 // Now jump to the place where smi keys are handled. 592 // Now jump to the place where smi keys are handled.
593 __ Branch(&index_smi); 593 __ Branch(&index_smi);
594 } 594 }
595 595
596 596
597 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
598 // Return address is in ra.
599 Label miss;
600
601 Register receiver = LoadDescriptor::ReceiverRegister();
602 Register index = LoadDescriptor::NameRegister();
603 Register scratch = a3;
604 Register result = v0;
605 DCHECK(!scratch.is(receiver) && !scratch.is(index));
606
607 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
608 &miss, // When not a string.
609 &miss, // When not a number.
610 &miss, // When index out of range.
611 STRING_INDEX_IS_ARRAY_INDEX);
612 char_at_generator.GenerateFast(masm);
613 __ Ret();
614
615 StubRuntimeCallHelper call_helper;
616 char_at_generator.GenerateSlow(masm, call_helper);
617
618 __ bind(&miss);
619 GenerateMiss(masm);
620 }
621
622
623 static void KeyedStoreGenerateGenericHelper( 597 static void KeyedStoreGenerateGenericHelper(
624 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 598 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
625 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 599 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
626 Register value, Register key, Register receiver, Register receiver_map, 600 Register value, Register key, Register receiver, Register receiver_map,
627 Register elements_map, Register elements) { 601 Register elements_map, Register elements) {
628 Label transition_smi_elements; 602 Label transition_smi_elements;
629 Label finish_object_store, non_double_value, transition_double_elements; 603 Label finish_object_store, non_double_value, transition_double_elements;
630 Label fast_double_without_map_check; 604 Label fast_double_without_map_check;
631 605
632 // Fast case: Do the store, could be either Object or double. 606 // Fast case: Do the store, could be either Object or double.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 patcher.ChangeBranchCondition(ne); 989 patcher.ChangeBranchCondition(ne);
1016 } else { 990 } else {
1017 DCHECK(Assembler::IsBne(branch_instr)); 991 DCHECK(Assembler::IsBne(branch_instr));
1018 patcher.ChangeBranchCondition(eq); 992 patcher.ChangeBranchCondition(eq);
1019 } 993 }
1020 } 994 }
1021 } 995 }
1022 } // namespace v8::internal 996 } // namespace v8::internal
1023 997
1024 #endif // V8_TARGET_ARCH_MIPS 998 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ic-compiler.cc ('k') | src/ic/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698