| 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 __ b(ne, &runtime); | 2051 __ b(ne, &runtime); |
| 2052 | 2052 |
| 2053 // Patch the arguments.length and the parameters pointer in the current frame. | 2053 // Patch the arguments.length and the parameters pointer in the current frame. |
| 2054 __ ldr(r2, MemOperand(r3, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 2054 __ ldr(r2, MemOperand(r3, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2055 __ str(r2, MemOperand(sp, 0 * kPointerSize)); | 2055 __ str(r2, MemOperand(sp, 0 * kPointerSize)); |
| 2056 __ add(r3, r3, Operand(r2, LSL, 1)); | 2056 __ add(r3, r3, Operand(r2, LSL, 1)); |
| 2057 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); | 2057 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 2058 __ str(r3, MemOperand(sp, 1 * kPointerSize)); | 2058 __ str(r3, MemOperand(sp, 1 * kPointerSize)); |
| 2059 | 2059 |
| 2060 __ bind(&runtime); | 2060 __ bind(&runtime); |
| 2061 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); | 2061 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1); |
| 2062 } | 2062 } |
| 2063 | 2063 |
| 2064 | 2064 |
| 2065 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { | 2065 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { |
| 2066 // Stack layout: | 2066 // Stack layout: |
| 2067 // sp[0] : number of parameters (tagged) | 2067 // sp[0] : number of parameters (tagged) |
| 2068 // sp[4] : address of receiver argument | 2068 // sp[4] : address of receiver argument |
| 2069 // sp[8] : function | 2069 // sp[8] : function |
| 2070 // Registers used over whole function: | 2070 // Registers used over whole function: |
| 2071 // r6 : allocated object (tagged) | 2071 // r6 : allocated object (tagged) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2255 | 2255 |
| 2256 // Return and remove the on-stack parameters. | 2256 // Return and remove the on-stack parameters. |
| 2257 __ add(sp, sp, Operand(3 * kPointerSize)); | 2257 __ add(sp, sp, Operand(3 * kPointerSize)); |
| 2258 __ Ret(); | 2258 __ Ret(); |
| 2259 | 2259 |
| 2260 // Do the runtime call to allocate the arguments object. | 2260 // Do the runtime call to allocate the arguments object. |
| 2261 // r0 = address of new object (tagged) | 2261 // r0 = address of new object (tagged) |
| 2262 // r2 = argument count (tagged) | 2262 // r2 = argument count (tagged) |
| 2263 __ bind(&runtime); | 2263 __ bind(&runtime); |
| 2264 __ str(r2, MemOperand(sp, 0 * kPointerSize)); // Patch argument count. | 2264 __ str(r2, MemOperand(sp, 0 * kPointerSize)); // Patch argument count. |
| 2265 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); | 2265 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1); |
| 2266 } | 2266 } |
| 2267 | 2267 |
| 2268 | 2268 |
| 2269 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { | 2269 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
| 2270 // sp[0] : number of parameters | 2270 // sp[0] : number of parameters |
| 2271 // sp[4] : receiver displacement | 2271 // sp[4] : receiver displacement |
| 2272 // sp[8] : function | 2272 // sp[8] : function |
| 2273 // Check if the calling frame is an arguments adaptor frame. | 2273 // Check if the calling frame is an arguments adaptor frame. |
| 2274 Label adaptor_frame, try_allocate, runtime; | 2274 Label adaptor_frame, try_allocate, runtime; |
| 2275 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 2275 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 __ cmp(r1, Operand::Zero()); | 2349 __ cmp(r1, Operand::Zero()); |
| 2350 __ b(ne, &loop); | 2350 __ b(ne, &loop); |
| 2351 | 2351 |
| 2352 // Return and remove the on-stack parameters. | 2352 // Return and remove the on-stack parameters. |
| 2353 __ bind(&done); | 2353 __ bind(&done); |
| 2354 __ add(sp, sp, Operand(3 * kPointerSize)); | 2354 __ add(sp, sp, Operand(3 * kPointerSize)); |
| 2355 __ Ret(); | 2355 __ Ret(); |
| 2356 | 2356 |
| 2357 // Do the runtime call to allocate the arguments object. | 2357 // Do the runtime call to allocate the arguments object. |
| 2358 __ bind(&runtime); | 2358 __ bind(&runtime); |
| 2359 __ TailCallRuntime(Runtime::kHiddenNewStrictArgumentsFast, 3, 1); | 2359 __ TailCallRuntime(Runtime::kHiddenNewStrictArguments, 3, 1); |
| 2360 } | 2360 } |
| 2361 | 2361 |
| 2362 | 2362 |
| 2363 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2363 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 2364 // Just jump directly to runtime if native RegExp is not selected at compile | 2364 // Just jump directly to runtime if native RegExp is not selected at compile |
| 2365 // time or if regexp entry in generated code is turned off runtime switch or | 2365 // time or if regexp entry in generated code is turned off runtime switch or |
| 2366 // at compilation. | 2366 // at compilation. |
| 2367 #ifdef V8_INTERPRETED_REGEXP | 2367 #ifdef V8_INTERPRETED_REGEXP |
| 2368 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); | 2368 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); |
| 2369 #else // V8_INTERPRETED_REGEXP | 2369 #else // V8_INTERPRETED_REGEXP |
| (...skipping 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5179 MemOperand(fp, 6 * kPointerSize), | 5179 MemOperand(fp, 6 * kPointerSize), |
| 5180 NULL); | 5180 NULL); |
| 5181 } | 5181 } |
| 5182 | 5182 |
| 5183 | 5183 |
| 5184 #undef __ | 5184 #undef __ |
| 5185 | 5185 |
| 5186 } } // namespace v8::internal | 5186 } } // namespace v8::internal |
| 5187 | 5187 |
| 5188 #endif // V8_TARGET_ARCH_ARM | 5188 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |