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'); | |
532 BranchOrBacktrack(not_equal, on_no_match); | 529 BranchOrBacktrack(not_equal, on_no_match); |
533 __ bind(&success); | 530 __ bind(&success); |
534 return true; | 531 return true; |
535 } | 532 } |
536 return false; | 533 return false; |
537 case 'S': | 534 case 'S': |
538 // The emitted code for generic character classes is good enough. | 535 // The emitted code for generic character classes is good enough. |
539 return false; | 536 return false; |
540 case 'd': | 537 case 'd': |
541 // Match ASCII digits ('0'..'9') | 538 // Match ASCII digits ('0'..'9') |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 } | 1322 } |
1326 | 1323 |
1327 | 1324 |
1328 #undef __ | 1325 #undef __ |
1329 | 1326 |
1330 #endif // V8_INTERPRETED_REGEXP | 1327 #endif // V8_INTERPRETED_REGEXP |
1331 | 1328 |
1332 }} // namespace v8::internal | 1329 }} // namespace v8::internal |
1333 | 1330 |
1334 #endif // V8_TARGET_ARCH_IA32 | 1331 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |