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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1831 | 1831 |
1832 // Check that the key is an array index, that is Uint32. | 1832 // Check that the key is an array index, that is Uint32. |
1833 __ NonNegativeSmiTst(key); | 1833 __ NonNegativeSmiTst(key); |
1834 __ b(ne, &slow); | 1834 __ b(ne, &slow); |
1835 | 1835 |
1836 // Everything is fine, call runtime. | 1836 // Everything is fine, call runtime. |
1837 __ Push(receiver, key); // Receiver, key. | 1837 __ Push(receiver, key); // Receiver, key. |
1838 | 1838 |
1839 // Perform tail call to the entry. | 1839 // Perform tail call to the entry. |
1840 __ TailCallExternalReference( | 1840 __ TailCallExternalReference( |
1841 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor), | 1841 ExternalReference( |
1842 masm->isolate()), | 1842 Runtime::FunctionForId(Runtime::kLoadElementWithInterceptor), |
| 1843 masm->isolate()), |
1843 2, 1); | 1844 2, 1); |
1844 | 1845 |
1845 __ bind(&slow); | 1846 __ bind(&slow); |
1846 PropertyAccessCompiler::TailCallBuiltin( | 1847 PropertyAccessCompiler::TailCallBuiltin( |
1847 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | 1848 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
1848 } | 1849 } |
1849 | 1850 |
1850 | 1851 |
1851 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { | 1852 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
1852 // sp[0] : number of parameters | 1853 // sp[0] : number of parameters |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2899 } | 2900 } |
2900 | 2901 |
2901 | 2902 |
2902 void CallICStub::GenerateMiss(MacroAssembler* masm) { | 2903 void CallICStub::GenerateMiss(MacroAssembler* masm) { |
2903 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 2904 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
2904 | 2905 |
2905 // Push the receiver and the function and feedback info. | 2906 // Push the receiver and the function and feedback info. |
2906 __ Push(r1, r2, r3); | 2907 __ Push(r1, r2, r3); |
2907 | 2908 |
2908 // Call the entry. | 2909 // Call the entry. |
2909 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss | 2910 Runtime::FunctionId id = GetICState() == DEFAULT |
2910 : IC::kCallIC_Customization_Miss; | 2911 ? Runtime::kCallIC_Miss |
| 2912 : Runtime::kCallIC_Customization_Miss; |
2911 | 2913 |
2912 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); | 2914 ExternalReference miss = |
| 2915 ExternalReference(Runtime::FunctionForId(id), masm->isolate()); |
2913 __ CallExternalReference(miss, 3); | 2916 __ CallExternalReference(miss, 3); |
2914 | 2917 |
2915 // Move result to edi and exit the internal frame. | 2918 // Move result to edi and exit the internal frame. |
2916 __ mov(r1, r0); | 2919 __ mov(r1, r0); |
2917 } | 2920 } |
2918 | 2921 |
2919 | 2922 |
2920 // StringCharCodeAtGenerator | 2923 // StringCharCodeAtGenerator |
2921 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 2924 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
2922 // If the receiver is a smi trigger the non-string case. | 2925 // If the receiver is a smi trigger the non-string case. |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3814 __ Ret(); | 3817 __ Ret(); |
3815 | 3818 |
3816 __ bind(&miss); | 3819 __ bind(&miss); |
3817 GenerateMiss(masm); | 3820 GenerateMiss(masm); |
3818 } | 3821 } |
3819 | 3822 |
3820 | 3823 |
3821 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 3824 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
3822 { | 3825 { |
3823 // Call the runtime system in a fresh internal frame. | 3826 // Call the runtime system in a fresh internal frame. |
3824 ExternalReference miss = | 3827 ExternalReference miss = ExternalReference( |
3825 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); | 3828 Runtime::FunctionForId(Runtime::kCompareIC_Miss), isolate()); |
3826 | 3829 |
3827 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 3830 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
3828 __ Push(r1, r0); | 3831 __ Push(r1, r0); |
3829 __ Push(lr, r1, r0); | 3832 __ Push(lr, r1, r0); |
3830 __ mov(ip, Operand(Smi::FromInt(op()))); | 3833 __ mov(ip, Operand(Smi::FromInt(op()))); |
3831 __ push(ip); | 3834 __ push(ip); |
3832 __ CallExternalReference(miss, 3); | 3835 __ CallExternalReference(miss, 3); |
3833 // Compute the entry point of the rewritten stub. | 3836 // Compute the entry point of the rewritten stub. |
3834 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 3837 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
3835 // Restore registers. | 3838 // Restore registers. |
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5374 MemOperand(fp, 6 * kPointerSize), NULL); | 5377 MemOperand(fp, 6 * kPointerSize), NULL); |
5375 } | 5378 } |
5376 | 5379 |
5377 | 5380 |
5378 #undef __ | 5381 #undef __ |
5379 | 5382 |
5380 } // namespace internal | 5383 } // namespace internal |
5381 } // namespace v8 | 5384 } // namespace v8 |
5382 | 5385 |
5383 #endif // V8_TARGET_ARCH_ARM | 5386 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |