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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 Label fallthrough; | 390 Label fallthrough; |
391 | 391 |
392 // Find length of back-referenced capture. | 392 // Find length of back-referenced capture. |
393 __ movq(rdx, register_location(start_reg)); | 393 __ movq(rdx, register_location(start_reg)); |
394 __ movq(rax, register_location(start_reg + 1)); | 394 __ movq(rax, register_location(start_reg + 1)); |
395 __ subq(rax, rdx); // Length to check. | 395 __ subq(rax, rdx); // Length to check. |
396 | 396 |
397 // Fail on partial or illegal capture (start of capture after end of capture). | 397 // Fail on partial or illegal capture (start of capture after end of capture). |
398 // This must not happen (no back-reference can reference a capture that wasn't | 398 // This must not happen (no back-reference can reference a capture that wasn't |
399 // closed before in the reg-exp). | 399 // closed before in the reg-exp). |
400 __ Check(greater_equal, "Invalid capture referenced"); | 400 __ Check(greater_equal, kInvalidCaptureReferenced); |
401 | 401 |
402 // Succeed on empty capture (including non-participating capture) | 402 // Succeed on empty capture (including non-participating capture) |
403 __ j(equal, &fallthrough); | 403 __ j(equal, &fallthrough); |
404 | 404 |
405 // ----------------------- | 405 // ----------------------- |
406 // rdx - Start of capture | 406 // rdx - Start of capture |
407 // rax - length of capture | 407 // rax - length of capture |
408 | 408 |
409 // Check that there are sufficient characters left in the input. | 409 // Check that there are sufficient characters left in the input. |
410 __ movl(rbx, rdi); | 410 __ movl(rbx, rdi); |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 } | 1440 } |
1441 } | 1441 } |
1442 | 1442 |
1443 #undef __ | 1443 #undef __ |
1444 | 1444 |
1445 #endif // V8_INTERPRETED_REGEXP | 1445 #endif // V8_INTERPRETED_REGEXP |
1446 | 1446 |
1447 }} // namespace v8::internal | 1447 }} // namespace v8::internal |
1448 | 1448 |
1449 #endif // V8_TARGET_ARCH_X64 | 1449 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |