Changeset 59222 in webkit for trunk/JavaScriptCore/yarr


Ignore:
Timestamp:
May 12, 2010, 4:49:40 AM (15 years ago)
Author:
[email protected]
Message:

2010-05-12 Peter Varga <[email protected]>

Reviewed by Gavin Barraclough.

Remove a direct jump in generatePatternCharacterGreedy() and
generatePatternCharacterClassGreedy() functions if quantityCount of the term
is unlimited.
https://bugs.webkit.org/show_bug.cgi?id=38898

  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexJIT.cpp

    r57925 r59222  
    617617        add32(Imm32(1), countRegister);
    618618        add32(Imm32(1), index);
    619         if (term.quantityCount != 0xffffffff)
     619        if (term.quantityCount != 0xffffffff) {
    620620            branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this);
    621         else
     621            failures.append(jump());
     622        } else
    622623            jump(loop);
    623 
    624         failures.append(jump());
    625624
    626625        Label backtrackBegin(this);
     
    743742        add32(Imm32(1), countRegister);
    744743        add32(Imm32(1), index);
    745         if (term.quantityCount != 0xffffffff)
     744        if (term.quantityCount != 0xffffffff) {
    746745            branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this);
    747         else
     746            failures.append(jump());
     747        } else
    748748            jump(loop);
    749 
    750         failures.append(jump());
    751749
    752750        Label backtrackBegin(this);
Note: See TracChangeset for help on using the changeset viewer.