OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 } | 731 } |
732 | 732 |
733 // Invoke function. | 733 // Invoke function. |
734 if (can_do_fast_api_call) { | 734 if (can_do_fast_api_call) { |
735 GenerateFastApiDirectCall(masm, optimization, arguments_.immediate()); | 735 GenerateFastApiDirectCall(masm, optimization, arguments_.immediate()); |
736 } else { | 736 } else { |
737 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) | 737 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
738 ? CALL_AS_FUNCTION | 738 ? CALL_AS_FUNCTION |
739 : CALL_AS_METHOD; | 739 : CALL_AS_METHOD; |
740 __ InvokeFunction(optimization.constant_function(), arguments_, | 740 __ InvokeFunction(optimization.constant_function(), arguments_, |
741 JUMP_FUNCTION, call_kind); | 741 JUMP_FUNCTION, NullCallWrapper(), call_kind); |
742 } | 742 } |
743 | 743 |
744 // Deferred code for fast API call case---clean preallocated space. | 744 // Deferred code for fast API call case---clean preallocated space. |
745 if (can_do_fast_api_call) { | 745 if (can_do_fast_api_call) { |
746 __ bind(&miss_cleanup); | 746 __ bind(&miss_cleanup); |
747 FreeSpaceForFastApiCall(masm); | 747 FreeSpaceForFastApiCall(masm); |
748 __ b(miss_label); | 748 __ b(miss_label); |
749 } | 749 } |
750 | 750 |
751 // Invoke a regular function. | 751 // Invoke a regular function. |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 generator.GenerateFast(masm()); | 1897 generator.GenerateFast(masm()); |
1898 __ Drop(argc + 1); | 1898 __ Drop(argc + 1); |
1899 __ Ret(); | 1899 __ Ret(); |
1900 | 1900 |
1901 StubRuntimeCallHelper call_helper; | 1901 StubRuntimeCallHelper call_helper; |
1902 generator.GenerateSlow(masm(), call_helper); | 1902 generator.GenerateSlow(masm(), call_helper); |
1903 | 1903 |
1904 // Tail call the full function. We do not have to patch the receiver | 1904 // Tail call the full function. We do not have to patch the receiver |
1905 // because the function makes no use of it. | 1905 // because the function makes no use of it. |
1906 __ bind(&slow); | 1906 __ bind(&slow); |
1907 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, CALL_AS_METHOD); | 1907 __ InvokeFunction( |
| 1908 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); |
1908 | 1909 |
1909 __ bind(&miss); | 1910 __ bind(&miss); |
1910 // r2: function name. | 1911 // r2: function name. |
1911 GenerateMissBranch(); | 1912 GenerateMissBranch(); |
1912 | 1913 |
1913 // Return the generated code. | 1914 // Return the generated code. |
1914 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); | 1915 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); |
1915 } | 1916 } |
1916 | 1917 |
1917 | 1918 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2042 __ Drop(argc + 1); | 2043 __ Drop(argc + 1); |
2043 __ Ret(); | 2044 __ Ret(); |
2044 | 2045 |
2045 __ bind(&wont_fit_smi); | 2046 __ bind(&wont_fit_smi); |
2046 // Restore FPCSR and fall to slow case. | 2047 // Restore FPCSR and fall to slow case. |
2047 __ vmsr(r3); | 2048 __ vmsr(r3); |
2048 | 2049 |
2049 __ bind(&slow); | 2050 __ bind(&slow); |
2050 // Tail call the full function. We do not have to patch the receiver | 2051 // Tail call the full function. We do not have to patch the receiver |
2051 // because the function makes no use of it. | 2052 // because the function makes no use of it. |
2052 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, CALL_AS_METHOD); | 2053 __ InvokeFunction( |
| 2054 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); |
2053 | 2055 |
2054 __ bind(&miss); | 2056 __ bind(&miss); |
2055 // r2: function name. | 2057 // r2: function name. |
2056 GenerateMissBranch(); | 2058 GenerateMissBranch(); |
2057 | 2059 |
2058 // Return the generated code. | 2060 // Return the generated code. |
2059 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); | 2061 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); |
2060 } | 2062 } |
2061 | 2063 |
2062 | 2064 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 __ LoadRoot(r6, Heap::kHeapNumberMapRootIndex); | 2142 __ LoadRoot(r6, Heap::kHeapNumberMapRootIndex); |
2141 __ AllocateHeapNumber(r0, r4, r5, r6, &slow); | 2143 __ AllocateHeapNumber(r0, r4, r5, r6, &slow); |
2142 __ str(r1, FieldMemOperand(r0, HeapNumber::kExponentOffset)); | 2144 __ str(r1, FieldMemOperand(r0, HeapNumber::kExponentOffset)); |
2143 __ str(r3, FieldMemOperand(r0, HeapNumber::kMantissaOffset)); | 2145 __ str(r3, FieldMemOperand(r0, HeapNumber::kMantissaOffset)); |
2144 __ Drop(argc + 1); | 2146 __ Drop(argc + 1); |
2145 __ Ret(); | 2147 __ Ret(); |
2146 | 2148 |
2147 // Tail call the full function. We do not have to patch the receiver | 2149 // Tail call the full function. We do not have to patch the receiver |
2148 // because the function makes no use of it. | 2150 // because the function makes no use of it. |
2149 __ bind(&slow); | 2151 __ bind(&slow); |
2150 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, CALL_AS_METHOD); | 2152 __ InvokeFunction( |
| 2153 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); |
2151 | 2154 |
2152 __ bind(&miss); | 2155 __ bind(&miss); |
2153 // r2: function name. | 2156 // r2: function name. |
2154 GenerateMissBranch(); | 2157 GenerateMissBranch(); |
2155 | 2158 |
2156 // Return the generated code. | 2159 // Return the generated code. |
2157 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); | 2160 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); |
2158 } | 2161 } |
2159 | 2162 |
2160 | 2163 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2318 // Calling non-strict non-builtins with a value as the receiver | 2321 // Calling non-strict non-builtins with a value as the receiver |
2319 // requires boxing. | 2322 // requires boxing. |
2320 __ jmp(&miss); | 2323 __ jmp(&miss); |
2321 } | 2324 } |
2322 break; | 2325 break; |
2323 } | 2326 } |
2324 | 2327 |
2325 CallKind call_kind = CallICBase::Contextual::decode(extra_state_) | 2328 CallKind call_kind = CallICBase::Contextual::decode(extra_state_) |
2326 ? CALL_AS_FUNCTION | 2329 ? CALL_AS_FUNCTION |
2327 : CALL_AS_METHOD; | 2330 : CALL_AS_METHOD; |
2328 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, call_kind); | 2331 __ InvokeFunction( |
| 2332 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), call_kind); |
2329 | 2333 |
2330 // Handle call cache miss. | 2334 // Handle call cache miss. |
2331 __ bind(&miss); | 2335 __ bind(&miss); |
2332 GenerateMissBranch(); | 2336 GenerateMissBranch(); |
2333 | 2337 |
2334 // Return the generated code. | 2338 // Return the generated code. |
2335 return GetCode(function); | 2339 return GetCode(function); |
2336 } | 2340 } |
2337 | 2341 |
2338 | 2342 |
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4212 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4216 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
4213 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4217 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
4214 } | 4218 } |
4215 | 4219 |
4216 | 4220 |
4217 #undef __ | 4221 #undef __ |
4218 | 4222 |
4219 } } // namespace v8::internal | 4223 } } // namespace v8::internal |
4220 | 4224 |
4221 #endif // V8_TARGET_ARCH_ARM | 4225 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |