OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 __ addp(rcx, rdx); | 831 __ addp(rcx, rdx); |
832 } | 832 } |
833 for (int i = 0; i < num_saved_registers_; i++) { | 833 for (int i = 0; i < num_saved_registers_; i++) { |
834 __ movq(rax, register_location(i)); | 834 __ movq(rax, register_location(i)); |
835 if (i == 0 && global_with_zero_length_check()) { | 835 if (i == 0 && global_with_zero_length_check()) { |
836 // Keep capture start in rdx for the zero-length check later. | 836 // Keep capture start in rdx for the zero-length check later. |
837 __ movp(rdx, rax); | 837 __ movp(rdx, rax); |
838 } | 838 } |
839 __ addp(rax, rcx); // Convert to index from start, not end. | 839 __ addp(rax, rcx); // Convert to index from start, not end. |
840 if (mode_ == UC16) { | 840 if (mode_ == UC16) { |
841 __ sar(rax, Immediate(1)); // Convert byte index to character index. | 841 __ sarp(rax, Immediate(1)); // Convert byte index to character index. |
842 } | 842 } |
843 __ movl(Operand(rbx, i * kIntSize), rax); | 843 __ movl(Operand(rbx, i * kIntSize), rax); |
844 } | 844 } |
845 } | 845 } |
846 | 846 |
847 if (global()) { | 847 if (global()) { |
848 // Restart matching if the regular expression is flagged as global. | 848 // Restart matching if the regular expression is flagged as global. |
849 // Increment success counter. | 849 // Increment success counter. |
850 __ incp(Operand(rbp, kSuccessfulCaptures)); | 850 __ incp(Operand(rbp, kSuccessfulCaptures)); |
851 // Capture results have been stored, so the number of remaining global | 851 // Capture results have been stored, so the number of remaining global |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 } | 1439 } |
1440 } | 1440 } |
1441 | 1441 |
1442 #undef __ | 1442 #undef __ |
1443 | 1443 |
1444 #endif // V8_INTERPRETED_REGEXP | 1444 #endif // V8_INTERPRETED_REGEXP |
1445 | 1445 |
1446 }} // namespace v8::internal | 1446 }} // namespace v8::internal |
1447 | 1447 |
1448 #endif // V8_TARGET_ARCH_X64 | 1448 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |