| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 value, key, receiver, receiver_map, elements_map, elements); | 727 value, key, receiver, receiver_map, elements_map, elements); |
| 728 KeyedStoreGenerateMegamorphicHelper(masm, &fast_object_grow, | 728 KeyedStoreGenerateMegamorphicHelper(masm, &fast_object_grow, |
| 729 &fast_double_grow, &slow, kDontCheckMap, | 729 &fast_double_grow, &slow, kDontCheckMap, |
| 730 kIncrementLength, value, key, receiver, | 730 kIncrementLength, value, key, receiver, |
| 731 receiver_map, elements_map, elements); | 731 receiver_map, elements_map, elements); |
| 732 | 732 |
| 733 __ bind(&miss); | 733 __ bind(&miss); |
| 734 GenerateMiss(masm); | 734 GenerateMiss(masm); |
| 735 } | 735 } |
| 736 | 736 |
| 737 | |
| 738 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | |
| 739 Register receiver = StoreDescriptor::ReceiverRegister(); | |
| 740 Register name = StoreDescriptor::NameRegister(); | |
| 741 DCHECK(receiver.is(r1)); | |
| 742 DCHECK(name.is(r2)); | |
| 743 DCHECK(StoreDescriptor::ValueRegister().is(r0)); | |
| 744 | |
| 745 // Get the receiver from the stack and probe the stub cache. | |
| 746 Code::Flags flags = | |
| 747 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); | |
| 748 | |
| 749 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, | |
| 750 receiver, name, r5, r6, r7, r8); | |
| 751 | |
| 752 // Cache miss: Jump to runtime. | |
| 753 GenerateMiss(masm); | |
| 754 } | |
| 755 | |
| 756 | |
| 757 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 737 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 758 StoreIC_PushArgs(masm); | 738 StoreIC_PushArgs(masm); |
| 759 | 739 |
| 760 // Perform tail call to the entry. | 740 // Perform tail call to the entry. |
| 761 __ TailCallRuntime(Runtime::kStoreIC_Miss); | 741 __ TailCallRuntime(Runtime::kStoreIC_Miss); |
| 762 } | 742 } |
| 763 | 743 |
| 764 | 744 |
| 765 void StoreIC::GenerateNormal(MacroAssembler* masm) { | 745 void StoreIC::GenerateNormal(MacroAssembler* masm) { |
| 766 Label miss; | 746 Label miss; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 patcher.EmitCondition(ne); | 860 patcher.EmitCondition(ne); |
| 881 } else { | 861 } else { |
| 882 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 862 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
| 883 patcher.EmitCondition(eq); | 863 patcher.EmitCondition(eq); |
| 884 } | 864 } |
| 885 } | 865 } |
| 886 } // namespace internal | 866 } // namespace internal |
| 887 } // namespace v8 | 867 } // namespace v8 |
| 888 | 868 |
| 889 #endif // V8_TARGET_ARCH_ARM | 869 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |