| 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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" | 7 #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/log.h" | 10 #include "src/log.h" |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 if (global_with_zero_length_check()) { | 834 if (global_with_zero_length_check()) { |
| 835 // Special case for zero-length matches. | 835 // Special case for zero-length matches. |
| 836 // t3: capture start index | 836 // t3: capture start index |
| 837 // Not a zero-length match, restart. | 837 // Not a zero-length match, restart. |
| 838 __ Branch( | 838 __ Branch( |
| 839 &load_char_start_regexp, ne, current_input_offset(), Operand(t3)); | 839 &load_char_start_regexp, ne, current_input_offset(), Operand(t3)); |
| 840 // Offset from the end is zero if we already reached the end. | 840 // Offset from the end is zero if we already reached the end. |
| 841 __ Branch(&exit_label_, eq, current_input_offset(), | 841 __ Branch(&exit_label_, eq, current_input_offset(), |
| 842 Operand(zero_reg)); | 842 Operand(zero_reg)); |
| 843 // Advance current position after a zero-length match. | 843 // Advance current position after a zero-length match. |
| 844 Label advance; |
| 845 __ bind(&advance); |
| 844 __ Daddu(current_input_offset(), | 846 __ Daddu(current_input_offset(), |
| 845 current_input_offset(), | 847 current_input_offset(), |
| 846 Operand((mode_ == UC16) ? 2 : 1)); | 848 Operand((mode_ == UC16) ? 2 : 1)); |
| 849 if (global_unicode()) CheckNotInSurrogatePair(0, &advance); |
| 847 } | 850 } |
| 848 | 851 |
| 849 __ Branch(&load_char_start_regexp); | 852 __ Branch(&load_char_start_regexp); |
| 850 } else { | 853 } else { |
| 851 __ li(v0, Operand(SUCCESS)); | 854 __ li(v0, Operand(SUCCESS)); |
| 852 } | 855 } |
| 853 } | 856 } |
| 854 // Exit and return v0. | 857 // Exit and return v0. |
| 855 __ bind(&exit_label_); | 858 __ bind(&exit_label_); |
| 856 if (global()) { | 859 if (global()) { |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 } | 1323 } |
| 1321 | 1324 |
| 1322 #undef __ | 1325 #undef __ |
| 1323 | 1326 |
| 1324 #endif // V8_INTERPRETED_REGEXP | 1327 #endif // V8_INTERPRETED_REGEXP |
| 1325 | 1328 |
| 1326 } // namespace internal | 1329 } // namespace internal |
| 1327 } // namespace v8 | 1330 } // namespace v8 |
| 1328 | 1331 |
| 1329 #endif // V8_TARGET_ARCH_MIPS64 | 1332 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |