| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/regexp/arm/regexp-macro-assembler-arm.h" | 7 #include "src/regexp/arm/regexp-macro-assembler-arm.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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 if (global_with_zero_length_check()) { | 791 if (global_with_zero_length_check()) { |
| 792 // Special case for zero-length matches. | 792 // Special case for zero-length matches. |
| 793 // r4: capture start index | 793 // r4: capture start index |
| 794 __ cmp(current_input_offset(), r4); | 794 __ cmp(current_input_offset(), r4); |
| 795 // Not a zero-length match, restart. | 795 // Not a zero-length match, restart. |
| 796 __ b(ne, &load_char_start_regexp); | 796 __ b(ne, &load_char_start_regexp); |
| 797 // Offset from the end is zero if we already reached the end. | 797 // Offset from the end is zero if we already reached the end. |
| 798 __ cmp(current_input_offset(), Operand::Zero()); | 798 __ cmp(current_input_offset(), Operand::Zero()); |
| 799 __ b(eq, &exit_label_); | 799 __ b(eq, &exit_label_); |
| 800 // Advance current position after a zero-length match. | 800 // Advance current position after a zero-length match. |
| 801 Label advance; |
| 802 __ bind(&advance); |
| 801 __ add(current_input_offset(), | 803 __ add(current_input_offset(), |
| 802 current_input_offset(), | 804 current_input_offset(), |
| 803 Operand((mode_ == UC16) ? 2 : 1)); | 805 Operand((mode_ == UC16) ? 2 : 1)); |
| 806 if (global_unicode()) CheckNotInSurrogatePair(0, &advance); |
| 804 } | 807 } |
| 805 | 808 |
| 806 __ b(&load_char_start_regexp); | 809 __ b(&load_char_start_regexp); |
| 807 } else { | 810 } else { |
| 808 __ mov(r0, Operand(SUCCESS)); | 811 __ mov(r0, Operand(SUCCESS)); |
| 809 } | 812 } |
| 810 } | 813 } |
| 811 | 814 |
| 812 // Exit and return r0 | 815 // Exit and return r0 |
| 813 __ bind(&exit_label_); | 816 __ bind(&exit_label_); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 | 1236 |
| 1234 | 1237 |
| 1235 #undef __ | 1238 #undef __ |
| 1236 | 1239 |
| 1237 #endif // V8_INTERPRETED_REGEXP | 1240 #endif // V8_INTERPRETED_REGEXP |
| 1238 | 1241 |
| 1239 } // namespace internal | 1242 } // namespace internal |
| 1240 } // namespace v8 | 1243 } // namespace v8 |
| 1241 | 1244 |
| 1242 #endif // V8_TARGET_ARCH_ARM | 1245 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |