| 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_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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |