| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 __ cmp(r4, r3); | 330 __ cmp(r4, r3); |
| 331 __ b(eq, &loop_check); | 331 __ b(eq, &loop_check); |
| 332 | 332 |
| 333 // Mismatch, try case-insensitive match (converting letters to lower-case). | 333 // Mismatch, try case-insensitive match (converting letters to lower-case). |
| 334 __ orr(r3, r3, Operand(0x20)); // Convert capture character to lower-case. | 334 __ orr(r3, r3, Operand(0x20)); // Convert capture character to lower-case. |
| 335 __ orr(r4, r4, Operand(0x20)); // Also convert input character. | 335 __ orr(r4, r4, Operand(0x20)); // Also convert input character. |
| 336 __ cmp(r4, r3); | 336 __ cmp(r4, r3); |
| 337 __ b(ne, &fail); | 337 __ b(ne, &fail); |
| 338 __ sub(r3, r3, Operand('a')); | 338 __ sub(r3, r3, Operand('a')); |
| 339 __ cmp(r3, Operand('z' - 'a')); // Is r3 a lowercase letter? | 339 __ cmp(r3, Operand('z' - 'a')); // Is r3 a lowercase letter? |
| 340 #ifndef ENABLE_LATIN_1 |
| 340 __ b(hi, &fail); | 341 __ b(hi, &fail); |
| 341 | 342 #else |
| 343 __ b(ls, &loop_check); // In range 'a'-'z'. |
| 344 // Latin-1: Check for values in range [224,254] but not 247. |
| 345 __ sub(r3, r3, Operand(224 - 'a')); |
| 346 __ cmp(r3, Operand(254 - 224)); |
| 347 __ b(hi, &fail); // Weren't Latin-1 letters. |
| 348 __ cmp(r3, Operand(247 - 224)); // Check for 247. |
| 349 __ b(eq, &fail); |
| 350 #endif |
| 342 | 351 |
| 343 __ bind(&loop_check); | 352 __ bind(&loop_check); |
| 344 __ cmp(r0, r1); | 353 __ cmp(r0, r1); |
| 345 __ b(lt, &loop); | 354 __ b(lt, &loop); |
| 346 __ jmp(&success); | 355 __ jmp(&success); |
| 347 | 356 |
| 348 __ bind(&fail); | 357 __ bind(&fail); |
| 349 BranchOrBacktrack(al, on_no_match); | 358 BranchOrBacktrack(al, on_no_match); |
| 350 | 359 |
| 351 __ bind(&success); | 360 __ bind(&success); |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); | 1420 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); |
| 1412 } | 1421 } |
| 1413 | 1422 |
| 1414 #undef __ | 1423 #undef __ |
| 1415 | 1424 |
| 1416 #endif // V8_INTERPRETED_REGEXP | 1425 #endif // V8_INTERPRETED_REGEXP |
| 1417 | 1426 |
| 1418 }} // namespace v8::internal | 1427 }} // namespace v8::internal |
| 1419 | 1428 |
| 1420 #endif // V8_TARGET_ARCH_ARM | 1429 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |