OLD | NEW |
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_MIPS64 | 8 #if V8_TARGET_ARCH_MIPS64 |
9 | 9 |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 a3); | 592 a3); |
593 __ Ret(); | 593 __ Ret(); |
594 | 594 |
595 __ bind(&index_name); | 595 __ bind(&index_name); |
596 __ IndexFromHash(a3, key); | 596 __ IndexFromHash(a3, key); |
597 // Now jump to the place where smi keys are handled. | 597 // Now jump to the place where smi keys are handled. |
598 __ Branch(&index_smi); | 598 __ Branch(&index_smi); |
599 } | 599 } |
600 | 600 |
601 | 601 |
602 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | |
603 // Return address is in ra. | |
604 Label miss; | |
605 | |
606 Register receiver = LoadDescriptor::ReceiverRegister(); | |
607 Register index = LoadDescriptor::NameRegister(); | |
608 Register scratch = a3; | |
609 Register result = v0; | |
610 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | |
611 | |
612 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, | |
613 &miss, // When not a string. | |
614 &miss, // When not a number. | |
615 &miss, // When index out of range. | |
616 STRING_INDEX_IS_ARRAY_INDEX); | |
617 char_at_generator.GenerateFast(masm); | |
618 __ Ret(); | |
619 | |
620 StubRuntimeCallHelper call_helper; | |
621 char_at_generator.GenerateSlow(masm, call_helper); | |
622 | |
623 __ bind(&miss); | |
624 GenerateMiss(masm); | |
625 } | |
626 | |
627 | |
628 static void KeyedStoreGenerateGenericHelper( | 602 static void KeyedStoreGenerateGenericHelper( |
629 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, | 603 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, |
630 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, | 604 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, |
631 Register value, Register key, Register receiver, Register receiver_map, | 605 Register value, Register key, Register receiver, Register receiver_map, |
632 Register elements_map, Register elements) { | 606 Register elements_map, Register elements) { |
633 Label transition_smi_elements; | 607 Label transition_smi_elements; |
634 Label finish_object_store, non_double_value, transition_double_elements; | 608 Label finish_object_store, non_double_value, transition_double_elements; |
635 Label fast_double_without_map_check; | 609 Label fast_double_without_map_check; |
636 | 610 |
637 // Fast case: Do the store, could be either Object or double. | 611 // Fast case: Do the store, could be either Object or double. |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 patcher.ChangeBranchCondition(ne); | 1017 patcher.ChangeBranchCondition(ne); |
1044 } else { | 1018 } else { |
1045 DCHECK(Assembler::IsBne(branch_instr)); | 1019 DCHECK(Assembler::IsBne(branch_instr)); |
1046 patcher.ChangeBranchCondition(eq); | 1020 patcher.ChangeBranchCondition(eq); |
1047 } | 1021 } |
1048 } | 1022 } |
1049 } | 1023 } |
1050 } // namespace v8::internal | 1024 } // namespace v8::internal |
1051 | 1025 |
1052 #endif // V8_TARGET_ARCH_MIPS64 | 1026 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |