OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 // ----------------------------------- | 803 // ----------------------------------- |
804 | 804 |
805 // Get the receiver from the stack and probe the stub cache. | 805 // Get the receiver from the stack and probe the stub cache. |
806 __ ldr(r1, MemOperand(sp)); | 806 __ ldr(r1, MemOperand(sp)); |
807 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 807 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
808 NOT_IN_LOOP, | 808 NOT_IN_LOOP, |
809 MONOMORPHIC); | 809 MONOMORPHIC); |
810 StubCache::GenerateProbe(masm, flags, r1, r2, r3, no_reg); | 810 StubCache::GenerateProbe(masm, flags, r1, r2, r3, no_reg); |
811 | 811 |
812 // Cache miss: Jump to runtime. | 812 // Cache miss: Jump to runtime. |
813 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); | 813 GenerateMiss(masm); |
814 } | 814 } |
815 | 815 |
816 | 816 |
817 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { | 817 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { |
818 // ----------- S t a t e ------------- | 818 // ----------- S t a t e ------------- |
819 // -- r0 : value | 819 // -- r0 : value |
820 // -- r2 : name | 820 // -- r2 : name |
821 // -- lr : return address | 821 // -- lr : return address |
822 // -- [sp] : receiver | 822 // -- [sp] : receiver |
823 // ----------------------------------- | 823 // ----------------------------------- |
824 | 824 |
825 __ ldr(r3, MemOperand(sp)); // copy receiver | 825 __ ldr(r3, MemOperand(sp)); // copy receiver |
826 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); | 826 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); |
827 | 827 |
828 // Perform tail call to the entry. | 828 // Perform tail call to the entry. |
829 __ TailCallRuntime( | 829 __ TailCallRuntime( |
830 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); | 830 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); |
831 } | 831 } |
832 | 832 |
833 | 833 |
834 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 834 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
835 // ----------- S t a t e ------------- | 835 // ----------- S t a t e ------------- |
836 // -- r0 : value | 836 // -- r0 : value |
837 // -- r2 : name | 837 // -- r2 : name |
838 // -- lr : return address | 838 // -- lr : return address |
839 // -- [sp] : receiver | 839 // -- [sp] : receiver |
840 // ----------------------------------- | 840 // ----------------------------------- |
841 | 841 |
842 __ ldr(r3, MemOperand(sp)); // copy receiver | 842 __ ldr(r3, MemOperand(sp)); // copy receiver |
843 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); | 843 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); |
844 | 844 |
845 // Perform tail call to the entry. | 845 // Perform tail call to the entry. |
846 __ TailCallRuntime(f, 3, 1); | 846 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); |
847 } | 847 } |
848 | 848 |
849 | 849 |
850 #undef __ | 850 #undef __ |
851 | 851 |
852 | 852 |
853 } } // namespace v8::internal | 853 } } // namespace v8::internal |
OLD | NEW |