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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 // One byte space characters are '\t'..'\r', ' ' and \u00a0. | 519 // One byte space characters are '\t'..'\r', ' ' and \u00a0. |
520 Label success; | 520 Label success; |
521 __ cmp(current_character(), ' '); | 521 __ cmp(current_character(), ' '); |
522 __ j(equal, &success, Label::kNear); | 522 __ j(equal, &success, Label::kNear); |
523 // Check range 0x09..0x0d | 523 // Check range 0x09..0x0d |
524 __ lea(eax, Operand(current_character(), -'\t')); | 524 __ lea(eax, Operand(current_character(), -'\t')); |
525 __ cmp(eax, '\r' - '\t'); | 525 __ cmp(eax, '\r' - '\t'); |
526 __ j(below_equal, &success, Label::kNear); | 526 __ j(below_equal, &success, Label::kNear); |
527 // \u00a0 (NBSP). | 527 // \u00a0 (NBSP). |
528 __ cmp(eax, 0x00a0 - '\t'); | 528 __ cmp(eax, 0x00a0 - '\t'); |
| 529 __ j(equal, &success, Label::kNear); |
| 530 // \u0085 (NEL). |
| 531 __ cmp(eax, 0x0085 - '\t'); |
529 BranchOrBacktrack(not_equal, on_no_match); | 532 BranchOrBacktrack(not_equal, on_no_match); |
530 __ bind(&success); | 533 __ bind(&success); |
531 return true; | 534 return true; |
532 } | 535 } |
533 return false; | 536 return false; |
534 case 'S': | 537 case 'S': |
535 // The emitted code for generic character classes is good enough. | 538 // The emitted code for generic character classes is good enough. |
536 return false; | 539 return false; |
537 case 'd': | 540 case 'd': |
538 // Match ASCII digits ('0'..'9') | 541 // Match ASCII digits ('0'..'9') |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 } | 1325 } |
1323 | 1326 |
1324 | 1327 |
1325 #undef __ | 1328 #undef __ |
1326 | 1329 |
1327 #endif // V8_INTERPRETED_REGEXP | 1330 #endif // V8_INTERPRETED_REGEXP |
1328 | 1331 |
1329 }} // namespace v8::internal | 1332 }} // namespace v8::internal |
1330 | 1333 |
1331 #endif // V8_TARGET_ARCH_IA32 | 1334 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |