| 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm, | 784 void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm, |
| 785 ExternalArrayType array_type) { | 785 ExternalArrayType array_type) { |
| 786 // TODO(476): port specialized code. | 786 // TODO(476): port specialized code. |
| 787 GenerateGeneric(masm); | 787 GenerateGeneric(masm); |
| 788 } | 788 } |
| 789 | 789 |
| 790 | 790 |
| 791 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 791 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 792 // ----------- S t a t e ------------- | 792 // ----------- S t a t e ------------- |
| 793 // -- r0 : value | 793 // -- r0 : value |
| 794 // -- r1 : receiver |
| 794 // -- r2 : name | 795 // -- r2 : name |
| 795 // -- lr : return address | 796 // -- lr : return address |
| 796 // -- [sp] : receiver | |
| 797 // ----------------------------------- | 797 // ----------------------------------- |
| 798 | 798 |
| 799 // Get the receiver from the stack and probe the stub cache. | 799 // Get the receiver from the stack and probe the stub cache. |
| 800 __ ldr(r1, MemOperand(sp)); | |
| 801 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 800 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
| 802 NOT_IN_LOOP, | 801 NOT_IN_LOOP, |
| 803 MONOMORPHIC); | 802 MONOMORPHIC); |
| 804 StubCache::GenerateProbe(masm, flags, r1, r2, r3, no_reg); | 803 StubCache::GenerateProbe(masm, flags, r1, r2, r3, no_reg); |
| 805 | 804 |
| 806 // Cache miss: Jump to runtime. | 805 // Cache miss: Jump to runtime. |
| 807 GenerateMiss(masm); | 806 GenerateMiss(masm); |
| 808 } | 807 } |
| 809 | 808 |
| 810 | 809 |
| 811 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 810 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 812 // ----------- S t a t e ------------- | 811 // ----------- S t a t e ------------- |
| 813 // -- r0 : value | 812 // -- r0 : value |
| 813 // -- r1 : receiver |
| 814 // -- r2 : name | 814 // -- r2 : name |
| 815 // -- lr : return address | 815 // -- lr : return address |
| 816 // -- [sp] : receiver | |
| 817 // ----------------------------------- | 816 // ----------------------------------- |
| 818 | 817 |
| 819 __ ldr(r3, MemOperand(sp)); // copy receiver | 818 __ push(r1); |
| 820 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); | 819 __ stm(db_w, sp, r2.bit() | r0.bit()); |
| 821 | 820 |
| 822 // Perform tail call to the entry. | 821 // Perform tail call to the entry. |
| 823 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); | 822 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); |
| 824 } | 823 } |
| 825 | 824 |
| 826 | 825 |
| 827 #undef __ | 826 #undef __ |
| 828 | 827 |
| 829 | 828 |
| 830 } } // namespace v8::internal | 829 } } // namespace v8::internal |
| OLD | NEW |