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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2084 __ bind(&runtime); | 2084 __ bind(&runtime); |
2085 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); | 2085 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
2086 } | 2086 } |
2087 | 2087 |
2088 | 2088 |
2089 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2089 void RegExpExecStub::Generate(MacroAssembler* masm) { |
2090 // Just jump directly to runtime if native RegExp is not selected at compile | 2090 // Just jump directly to runtime if native RegExp is not selected at compile |
2091 // time or if regexp entry in generated code is turned off runtime switch or | 2091 // time or if regexp entry in generated code is turned off runtime switch or |
2092 // at compilation. | 2092 // at compilation. |
2093 #ifdef V8_INTERPRETED_REGEXP | 2093 #ifdef V8_INTERPRETED_REGEXP |
2094 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2094 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
2095 #else // V8_INTERPRETED_REGEXP | 2095 #else // V8_INTERPRETED_REGEXP |
2096 | 2096 |
2097 // Stack frame on entry. | 2097 // Stack frame on entry. |
2098 // sp[0]: last_match_info (expected JSArray) | 2098 // sp[0]: last_match_info (expected JSArray) |
2099 // sp[4]: previous index | 2099 // sp[4]: previous index |
2100 // sp[8]: subject string | 2100 // sp[8]: subject string |
2101 // sp[12]: JSRegExp object | 2101 // sp[12]: JSRegExp object |
2102 | 2102 |
2103 const int kLastMatchInfoOffset = 0 * kPointerSize; | 2103 const int kLastMatchInfoOffset = 0 * kPointerSize; |
2104 const int kPreviousIndexOffset = 1 * kPointerSize; | 2104 const int kPreviousIndexOffset = 1 * kPointerSize; |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 __ daddiu(a0, a0, kPointerSize); // In branch delay slot. | 2498 __ daddiu(a0, a0, kPointerSize); // In branch delay slot. |
2499 | 2499 |
2500 __ bind(&done); | 2500 __ bind(&done); |
2501 | 2501 |
2502 // Return last match info. | 2502 // Return last match info. |
2503 __ ld(v0, MemOperand(sp, kLastMatchInfoOffset)); | 2503 __ ld(v0, MemOperand(sp, kLastMatchInfoOffset)); |
2504 __ DropAndRet(4); | 2504 __ DropAndRet(4); |
2505 | 2505 |
2506 // Do the runtime call to execute the regexp. | 2506 // Do the runtime call to execute the regexp. |
2507 __ bind(&runtime); | 2507 __ bind(&runtime); |
2508 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2508 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
2509 | 2509 |
2510 // Deferred code for string handling. | 2510 // Deferred code for string handling. |
2511 // (6) Not a long external string? If yes, go to (8). | 2511 // (6) Not a long external string? If yes, go to (8). |
2512 __ bind(¬_seq_nor_cons); | 2512 __ bind(¬_seq_nor_cons); |
2513 // Go to (8). | 2513 // Go to (8). |
2514 __ Branch(¬_long_external, gt, a1, Operand(kExternalStringTag)); | 2514 __ Branch(¬_long_external, gt, a1, Operand(kExternalStringTag)); |
2515 | 2515 |
2516 // (7) External string. Make it, offset-wise, look like a sequential string. | 2516 // (7) External string. Make it, offset-wise, look like a sequential string. |
2517 __ bind(&external_string); | 2517 __ bind(&external_string); |
2518 __ ld(a0, FieldMemOperand(subject, HeapObject::kMapOffset)); | 2518 __ ld(a0, FieldMemOperand(subject, HeapObject::kMapOffset)); |
(...skipping 2789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5308 kStackUnwindSpace, kInvalidStackOffset, | 5308 kStackUnwindSpace, kInvalidStackOffset, |
5309 MemOperand(fp, 6 * kPointerSize), NULL); | 5309 MemOperand(fp, 6 * kPointerSize), NULL); |
5310 } | 5310 } |
5311 | 5311 |
5312 | 5312 |
5313 #undef __ | 5313 #undef __ |
5314 | 5314 |
5315 } } // namespace v8::internal | 5315 } } // namespace v8::internal |
5316 | 5316 |
5317 #endif // V8_TARGET_ARCH_MIPS64 | 5317 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |