Index: src/arm/regexp-macro-assembler-arm.cc |
diff --git a/src/arm/regexp-macro-assembler-arm.cc b/src/arm/regexp-macro-assembler-arm.cc |
index acb24ef14eeff9e2c28243f5b0982452497c4507..7e6c344c061a24f2f8dc722b924d08b85b088c29 100644 |
--- a/src/arm/regexp-macro-assembler-arm.cc |
+++ b/src/arm/regexp-macro-assembler-arm.cc |
@@ -539,29 +539,23 @@ bool RegExpMacroAssemblerARM::CheckSpecialCharacterClass(uc16 type, |
case 's': |
// Match space-characters |
if (mode_ == ASCII) { |
- // ASCII space characters are '\t'..'\r' and ' '. |
+ // One byte space characters are '\t'..'\r', ' ' and \u00a0. |
Label success; |
__ cmp(current_character(), Operand(' ')); |
__ b(eq, &success); |
// Check range 0x09..0x0d |
__ sub(r0, current_character(), Operand('\t')); |
__ cmp(r0, Operand('\r' - '\t')); |
- BranchOrBacktrack(hi, on_no_match); |
+ __ b(ls, &success); |
+ // \u00a0 (NBSP). |
+ __ cmp(r0, Operand(0x00a0 - '\t')); |
+ BranchOrBacktrack(ne, on_no_match); |
__ bind(&success); |
return true; |
} |
return false; |
case 'S': |
- // Match non-space characters. |
- if (mode_ == ASCII) { |
- // ASCII space characters are '\t'..'\r' and ' '. |
- __ cmp(current_character(), Operand(' ')); |
- BranchOrBacktrack(eq, on_no_match); |
- __ sub(r0, current_character(), Operand('\t')); |
- __ cmp(r0, Operand('\r' - '\t')); |
- BranchOrBacktrack(ls, on_no_match); |
- return true; |
- } |
+ // The emitted code for generic character classes is good enough. |
return false; |
case 'd': |
// Match ASCII digits ('0'..'9') |