OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2099 __ bind(&runtime); | 2099 __ bind(&runtime); |
2100 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); | 2100 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
2101 } | 2101 } |
2102 | 2102 |
2103 | 2103 |
2104 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2104 void RegExpExecStub::Generate(MacroAssembler* masm) { |
2105 // Just jump directly to runtime if native RegExp is not selected at compile | 2105 // Just jump directly to runtime if native RegExp is not selected at compile |
2106 // time or if regexp entry in generated code is turned off runtime switch or | 2106 // time or if regexp entry in generated code is turned off runtime switch or |
2107 // at compilation. | 2107 // at compilation. |
2108 #ifdef V8_INTERPRETED_REGEXP | 2108 #ifdef V8_INTERPRETED_REGEXP |
2109 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2109 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
2110 #else // V8_INTERPRETED_REGEXP | 2110 #else // V8_INTERPRETED_REGEXP |
2111 | 2111 |
2112 // Stack frame on entry. | 2112 // Stack frame on entry. |
2113 // sp[0]: last_match_info (expected JSArray) | 2113 // sp[0]: last_match_info (expected JSArray) |
2114 // sp[4]: previous index | 2114 // sp[4]: previous index |
2115 // sp[8]: subject string | 2115 // sp[8]: subject string |
2116 // sp[12]: JSRegExp object | 2116 // sp[12]: JSRegExp object |
2117 | 2117 |
2118 const int kLastMatchInfoOffset = 0 * kPointerSize; | 2118 const int kLastMatchInfoOffset = 0 * kPointerSize; |
2119 const int kPreviousIndexOffset = 1 * kPointerSize; | 2119 const int kPreviousIndexOffset = 1 * kPointerSize; |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2484 __ StorePU(r6, MemOperand(r3, kPointerSize)); | 2484 __ StorePU(r6, MemOperand(r3, kPointerSize)); |
2485 __ bdnz(&next_capture); | 2485 __ bdnz(&next_capture); |
2486 | 2486 |
2487 // Return last match info. | 2487 // Return last match info. |
2488 __ LoadP(r3, MemOperand(sp, kLastMatchInfoOffset)); | 2488 __ LoadP(r3, MemOperand(sp, kLastMatchInfoOffset)); |
2489 __ addi(sp, sp, Operand(4 * kPointerSize)); | 2489 __ addi(sp, sp, Operand(4 * kPointerSize)); |
2490 __ Ret(); | 2490 __ Ret(); |
2491 | 2491 |
2492 // Do the runtime call to execute the regexp. | 2492 // Do the runtime call to execute the regexp. |
2493 __ bind(&runtime); | 2493 __ bind(&runtime); |
2494 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2494 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
2495 | 2495 |
2496 // Deferred code for string handling. | 2496 // Deferred code for string handling. |
2497 // (6) Not a long external string? If yes, go to (8). | 2497 // (6) Not a long external string? If yes, go to (8). |
2498 __ bind(¬_seq_nor_cons); | 2498 __ bind(¬_seq_nor_cons); |
2499 // Compare flags are still set. | 2499 // Compare flags are still set. |
2500 __ bgt(¬_long_external); // Go to (8). | 2500 __ bgt(¬_long_external); // Go to (8). |
2501 | 2501 |
2502 // (7) External string. Make it, offset-wise, look like a sequential string. | 2502 // (7) External string. Make it, offset-wise, look like a sequential string. |
2503 __ bind(&external_string); | 2503 __ bind(&external_string); |
2504 __ LoadP(r3, FieldMemOperand(subject, HeapObject::kMapOffset)); | 2504 __ LoadP(r3, FieldMemOperand(subject, HeapObject::kMapOffset)); |
(...skipping 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5342 kStackUnwindSpace, NULL, | 5342 kStackUnwindSpace, NULL, |
5343 MemOperand(fp, 6 * kPointerSize), NULL); | 5343 MemOperand(fp, 6 * kPointerSize), NULL); |
5344 } | 5344 } |
5345 | 5345 |
5346 | 5346 |
5347 #undef __ | 5347 #undef __ |
5348 } | 5348 } |
5349 } // namespace v8::internal | 5349 } // namespace v8::internal |
5350 | 5350 |
5351 #endif // V8_TARGET_ARCH_PPC | 5351 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |