| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 // check if there are any ranges or matches below lo. If not, just jl t
o failure - | 357 // check if there are any ranges or matches below lo. If not, just jl t
o failure - |
| 358 // if there is anything else to check, check that first, if it falls thr
ough jmp to failure. | 358 // if there is anything else to check, check that first, if it falls thr
ough jmp to failure. |
| 359 if ((*matchIndex < matchCount) && (matches[*matchIndex] < lo)) { | 359 if ((*matchIndex < matchCount) && (matches[*matchIndex] < lo)) { |
| 360 Jump loOrAbove = jge32(character, Imm32((unsigned short)lo)); | 360 Jump loOrAbove = jge32(character, Imm32((unsigned short)lo)); |
| 361 | 361 |
| 362 // generate code for all ranges before this one | 362 // generate code for all ranges before this one |
| 363 if (which) | 363 if (which) |
| 364 generateCharacterClassInvertedRange(failures, matchDest, ranges,
which, matchIndex, matches, matchCount); | 364 generateCharacterClassInvertedRange(failures, matchDest, ranges,
which, matchIndex, matches, matchCount); |
| 365 | 365 |
| 366 do { | 366 while ((*matchIndex < matchCount) && (matches[*matchIndex] < lo)) { |
| 367 matchDest.append(je32(character, Imm32((unsigned short)matches[*
matchIndex]))); | 367 matchDest.append(je32(character, Imm32((unsigned short)matches[*
matchIndex]))); |
| 368 ++*matchIndex; | 368 ++*matchIndex; |
| 369 } while ((*matchIndex < matchCount) && (matches[*matchIndex] < lo)); | 369 } |
| 370 failures.append(jump()); | 370 failures.append(jump()); |
| 371 | 371 |
| 372 loOrAbove.link(this); | 372 loOrAbove.link(this); |
| 373 } else if (which) { | 373 } else if (which) { |
| 374 Jump loOrAbove = jge32(character, Imm32((unsigned short)lo)); | 374 Jump loOrAbove = jge32(character, Imm32((unsigned short)lo)); |
| 375 | 375 |
| 376 generateCharacterClassInvertedRange(failures, matchDest, ranges, whi
ch, matchIndex, matches, matchCount); | 376 generateCharacterClassInvertedRange(failures, matchDest, ranges, whi
ch, matchIndex, matches, matchCount); |
| 377 failures.append(jump()); | 377 failures.append(jump()); |
| 378 | 378 |
| 379 loOrAbove.link(this); | 379 loOrAbove.link(this); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 { | 659 { |
| 660 successes.link(this); | 660 successes.link(this); |
| 661 } | 661 } |
| 662 | 662 |
| 663 } } // namespace JSC::WREC | 663 } } // namespace JSC::WREC |
| 664 | 664 |
| 665 #endif // ENABLE(WREC) | 665 #endif // ENABLE(WREC) |
| 666 | 666 |
| 667 | 667 |
| 668 | 668 |
| OLD | NEW |