| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 __ lbu(t0, MemOperand(a2, 0)); | 334 __ lbu(t0, MemOperand(a2, 0)); |
| 335 __ addiu(a2, a2, char_size()); | 335 __ addiu(a2, a2, char_size()); |
| 336 | 336 |
| 337 __ Branch(&loop_check, eq, t0, Operand(a3)); | 337 __ Branch(&loop_check, eq, t0, Operand(a3)); |
| 338 | 338 |
| 339 // Mismatch, try case-insensitive match (converting letters to lower-case). | 339 // Mismatch, try case-insensitive match (converting letters to lower-case). |
| 340 __ Or(a3, a3, Operand(0x20)); // Convert capture character to lower-case. | 340 __ Or(a3, a3, Operand(0x20)); // Convert capture character to lower-case. |
| 341 __ Or(t0, t0, Operand(0x20)); // Also convert input character. | 341 __ Or(t0, t0, Operand(0x20)); // Also convert input character. |
| 342 __ Branch(&fail, ne, t0, Operand(a3)); | 342 __ Branch(&fail, ne, t0, Operand(a3)); |
| 343 __ Subu(a3, a3, Operand('a')); | 343 __ Subu(a3, a3, Operand('a')); |
| 344 #ifndef ENABLE_LATIN_1 |
| 344 __ Branch(&fail, hi, a3, Operand('z' - 'a')); // Is a3 a lowercase letter? | 345 __ Branch(&fail, hi, a3, Operand('z' - 'a')); // Is a3 a lowercase letter? |
| 346 #else |
| 347 __ Branch(&loop_check, ls, a3, Operand('z' - 'a')); |
| 348 // Latin-1: Check for values in range [224,254] but not 247. |
| 349 __ Subu(a3, a3, Operand(224 - 'a')); |
| 350 // Weren't Latin-1 letters. |
| 351 __ Branch(&fail, hi, a3, Operand(254 - 224)); |
| 352 // Check for 247. |
| 353 __ Branch(&fail, eq, a3, Operand(247 - 224)); |
| 354 #endif |
| 345 | 355 |
| 346 __ bind(&loop_check); | 356 __ bind(&loop_check); |
| 347 __ Branch(&loop, lt, a0, Operand(a1)); | 357 __ Branch(&loop, lt, a0, Operand(a1)); |
| 348 __ jmp(&success); | 358 __ jmp(&success); |
| 349 | 359 |
| 350 __ bind(&fail); | 360 __ bind(&fail); |
| 351 GoTo(on_no_match); | 361 GoTo(on_no_match); |
| 352 | 362 |
| 353 __ bind(&success); | 363 __ bind(&success); |
| 354 // Compute new value of character position after the matched part. | 364 // Compute new value of character position after the matched part. |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 } | 1388 } |
| 1379 | 1389 |
| 1380 | 1390 |
| 1381 #undef __ | 1391 #undef __ |
| 1382 | 1392 |
| 1383 #endif // V8_INTERPRETED_REGEXP | 1393 #endif // V8_INTERPRETED_REGEXP |
| 1384 | 1394 |
| 1385 }} // namespace v8::internal | 1395 }} // namespace v8::internal |
| 1386 | 1396 |
| 1387 #endif // V8_TARGET_ARCH_MIPS | 1397 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |