Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(866)

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make mips work Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arguments.h ('k') | src/arm/debug-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 Register key = LoadDescriptor::NameRegister(); 1830 Register key = LoadDescriptor::NameRegister();
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 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
1841 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
1842 masm->isolate()),
1843 2, 1);
1844 1841
1845 __ bind(&slow); 1842 __ bind(&slow);
1846 PropertyAccessCompiler::TailCallBuiltin( 1843 PropertyAccessCompiler::TailCallBuiltin(
1847 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 1844 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
1848 } 1845 }
1849 1846
1850 1847
1851 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 1848 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
1852 // sp[0] : number of parameters 1849 // sp[0] : number of parameters
1853 // sp[4] : receiver displacement 1850 // sp[4] : receiver displacement
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
2899 } 2896 }
2900 2897
2901 2898
2902 void CallICStub::GenerateMiss(MacroAssembler* masm) { 2899 void CallICStub::GenerateMiss(MacroAssembler* masm) {
2903 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 2900 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
2904 2901
2905 // Push the receiver and the function and feedback info. 2902 // Push the receiver and the function and feedback info.
2906 __ Push(r1, r2, r3); 2903 __ Push(r1, r2, r3);
2907 2904
2908 // Call the entry. 2905 // Call the entry.
2909 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 2906 Runtime::FunctionId id = GetICState() == DEFAULT
2910 : IC::kCallIC_Customization_Miss; 2907 ? Runtime::kCallIC_Miss
2911 2908 : Runtime::kCallIC_Customization_Miss;
2912 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 2909 __ CallRuntime(id, 3);
2913 __ CallExternalReference(miss, 3);
2914 2910
2915 // Move result to edi and exit the internal frame. 2911 // Move result to edi and exit the internal frame.
2916 __ mov(r1, r0); 2912 __ mov(r1, r0);
2917 } 2913 }
2918 2914
2919 2915
2920 // StringCharCodeAtGenerator 2916 // StringCharCodeAtGenerator
2921 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { 2917 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
2922 // If the receiver is a smi trigger the non-string case. 2918 // If the receiver is a smi trigger the non-string case.
2923 if (check_mode_ == RECEIVER_IS_UNKNOWN) { 2919 if (check_mode_ == RECEIVER_IS_UNKNOWN) {
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
3814 __ Ret(); 3810 __ Ret();
3815 3811
3816 __ bind(&miss); 3812 __ bind(&miss);
3817 GenerateMiss(masm); 3813 GenerateMiss(masm);
3818 } 3814 }
3819 3815
3820 3816
3821 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3817 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
3822 { 3818 {
3823 // Call the runtime system in a fresh internal frame. 3819 // Call the runtime system in a fresh internal frame.
3824 ExternalReference miss =
3825 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate());
3826
3827 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 3820 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
3828 __ Push(r1, r0); 3821 __ Push(r1, r0);
3829 __ Push(lr, r1, r0); 3822 __ Push(lr, r1, r0);
3830 __ mov(ip, Operand(Smi::FromInt(op()))); 3823 __ mov(ip, Operand(Smi::FromInt(op())));
3831 __ push(ip); 3824 __ push(ip);
3832 __ CallExternalReference(miss, 3); 3825 __ CallRuntime(Runtime::kCompareIC_Miss, 3);
3833 // Compute the entry point of the rewritten stub. 3826 // Compute the entry point of the rewritten stub.
3834 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); 3827 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
3835 // Restore registers. 3828 // Restore registers.
3836 __ pop(lr); 3829 __ pop(lr);
3837 __ Pop(r1, r0); 3830 __ Pop(r1, r0);
3838 } 3831 }
3839 3832
3840 __ Jump(r2); 3833 __ Jump(r2);
3841 } 3834 }
3842 3835
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
5374 MemOperand(fp, 6 * kPointerSize), NULL); 5367 MemOperand(fp, 6 * kPointerSize), NULL);
5375 } 5368 }
5376 5369
5377 5370
5378 #undef __ 5371 #undef __
5379 5372
5380 } // namespace internal 5373 } // namespace internal
5381 } // namespace v8 5374 } // namespace v8
5382 5375
5383 #endif // V8_TARGET_ARCH_ARM 5376 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arguments.h ('k') | src/arm/debug-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698