| 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 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1957 __ bind(&runtime); | 1957 __ bind(&runtime); |
| 1958 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); | 1958 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 | 1961 |
| 1962 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1962 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 1963 // Just jump directly to runtime if native RegExp is not selected at compile | 1963 // Just jump directly to runtime if native RegExp is not selected at compile |
| 1964 // time or if regexp entry in generated code is turned off runtime switch or | 1964 // time or if regexp entry in generated code is turned off runtime switch or |
| 1965 // at compilation. | 1965 // at compilation. |
| 1966 #ifdef V8_INTERPRETED_REGEXP | 1966 #ifdef V8_INTERPRETED_REGEXP |
| 1967 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 1967 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 1968 #else // V8_INTERPRETED_REGEXP | 1968 #else // V8_INTERPRETED_REGEXP |
| 1969 | 1969 |
| 1970 // Stack frame on entry. | 1970 // Stack frame on entry. |
| 1971 // sp[0]: last_match_info (expected JSArray) | 1971 // sp[0]: last_match_info (expected JSArray) |
| 1972 // sp[4]: previous index | 1972 // sp[4]: previous index |
| 1973 // sp[8]: subject string | 1973 // sp[8]: subject string |
| 1974 // sp[12]: JSRegExp object | 1974 // sp[12]: JSRegExp object |
| 1975 | 1975 |
| 1976 const int kLastMatchInfoOffset = 0 * kPointerSize; | 1976 const int kLastMatchInfoOffset = 0 * kPointerSize; |
| 1977 const int kPreviousIndexOffset = 1 * kPointerSize; | 1977 const int kPreviousIndexOffset = 1 * kPointerSize; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2324 __ jmp(&next_capture); | 2324 __ jmp(&next_capture); |
| 2325 __ bind(&done); | 2325 __ bind(&done); |
| 2326 | 2326 |
| 2327 // Return last match info. | 2327 // Return last match info. |
| 2328 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); | 2328 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); |
| 2329 __ add(sp, sp, Operand(4 * kPointerSize)); | 2329 __ add(sp, sp, Operand(4 * kPointerSize)); |
| 2330 __ Ret(); | 2330 __ Ret(); |
| 2331 | 2331 |
| 2332 // Do the runtime call to execute the regexp. | 2332 // Do the runtime call to execute the regexp. |
| 2333 __ bind(&runtime); | 2333 __ bind(&runtime); |
| 2334 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2334 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 2335 | 2335 |
| 2336 // Deferred code for string handling. | 2336 // Deferred code for string handling. |
| 2337 // (6) Not a long external string? If yes, go to (8). | 2337 // (6) Not a long external string? If yes, go to (8). |
| 2338 __ bind(¬_seq_nor_cons); | 2338 __ bind(¬_seq_nor_cons); |
| 2339 // Compare flags are still set. | 2339 // Compare flags are still set. |
| 2340 __ b(gt, ¬_long_external); // Go to (8). | 2340 __ b(gt, ¬_long_external); // Go to (8). |
| 2341 | 2341 |
| 2342 // (7) External string. Make it, offset-wise, look like a sequential string. | 2342 // (7) External string. Make it, offset-wise, look like a sequential string. |
| 2343 __ bind(&external_string); | 2343 __ bind(&external_string); |
| 2344 __ ldr(r0, FieldMemOperand(subject, HeapObject::kMapOffset)); | 2344 __ ldr(r0, FieldMemOperand(subject, HeapObject::kMapOffset)); |
| (...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5050 kStackUnwindSpace, NULL, | 5050 kStackUnwindSpace, NULL, |
| 5051 MemOperand(fp, 6 * kPointerSize), NULL); | 5051 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5052 } | 5052 } |
| 5053 | 5053 |
| 5054 | 5054 |
| 5055 #undef __ | 5055 #undef __ |
| 5056 | 5056 |
| 5057 } } // namespace v8::internal | 5057 } } // namespace v8::internal |
| 5058 | 5058 |
| 5059 #endif // V8_TARGET_ARCH_ARM | 5059 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |