Ignore:
Timestamp:
Aug 16, 2009, 6:14:24 AM (16 years ago)
Author:
[email protected]
Message:

2009-08-16 Holger Hans Peter Freyther <[email protected]>

Reviewed by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=28352

Fix coding style violations. Use m_ for C++ class members. Remove
trailing whitespace on empty lines.

  • yarr/RegexInterpreter.cpp: (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): (JSC::Yarr::Interpreter::tryConsumeCharacter): (JSC::Yarr::Interpreter::tryConsumeBackReference): (JSC::Yarr::Interpreter::parenthesesDoBacktrack): (JSC::Yarr::Interpreter::backtrackParentheses): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::ByteCompiler::assertionBOL): (JSC::Yarr::ByteCompiler::assertionEOL): (JSC::Yarr::ByteCompiler::assertionWordBoundary): (JSC::Yarr::ByteCompiler::atomPatternCharacter): (JSC::Yarr::ByteCompiler::atomCharacterClass): (JSC::Yarr::ByteCompiler::atomBackReference): (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): (JSC::Yarr::ByteCompiler::popParenthesesStack): (JSC::Yarr::ByteCompiler::closeAlternative): (JSC::Yarr::ByteCompiler::closeBodyAlternative): (JSC::Yarr::ByteCompiler::atomParenthesesEnd): (JSC::Yarr::ByteCompiler::regexBegin): (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction): (JSC::Yarr::ByteCompiler::alterantiveDisjunction): (JSC::Yarr::ByteCompiler::emitDisjunction):
File:
1 edited

Legend:

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

    r46778 r47337  
    2121 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    2222 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    2525
     
    9191        {
    9292        }
    93        
     93
    9494        void* operator new(size_t, void* where)
    9595        {
     
    125125                output[(firstSubpatternId << 1) + i] = -1;
    126126            }
    127            
     127
    128128            new(getDisjunctionContext(term)) DisjunctionContext();
    129129        }
     
    139139                output[(firstSubpatternId << 1) + i] = subpatternBackup[i];
    140140        }
    141        
     141
    142142        DisjunctionContext* getDisjunctionContext(ByteTerm& term)
    143143        {
     
    209209            return -1;
    210210        }
    211        
     211
    212212        unsigned getPos()
    213213        {
     
    219219            pos = p;
    220220        }
    221        
     221
    222222        bool atStart()
    223223        {
     
    285285        if (input.atEnd())
    286286            return false;
    287        
     287
    288288        int ch = input.read();
    289289
     
    342342            }
    343343        }
    344        
     344
    345345        return true;
    346346    }
     
    607607            if (matchDisjunction(term.atom.parenthesesDisjunction, context->getDisjunctionContext(term), true))
    608608                return true;
    609            
     609
    610610            resetMatches(term, context);
    611611            freeParenthesesDisjunctionContext(context);
     
    947947                    return true;
    948948                }
    949                
     949
    950950                // pop a match off the stack
    951951                resetMatches(term, context);
     
    12671267        : m_pattern(pattern)
    12681268    {
    1269         bodyDisjunction = 0;
    1270         currentAlternativeIndex = 0;
    1271     }
    1272    
     1269        m_bodyDisjunction = 0;
     1270        m_currentAlternativeIndex = 0;
     1271    }
     1272
    12731273    BytecodePattern* compile()
    12741274    {
     
    12771277        regexEnd();
    12781278
    1279         return new BytecodePattern(bodyDisjunction, m_allParenthesesInfo, m_pattern);
    1280     }
    1281    
     1279        return new BytecodePattern(m_bodyDisjunction, m_allParenthesesInfo, m_pattern);
     1280    }
     1281
    12821282    void checkInput(unsigned count)
    12831283    {
    1284         bodyDisjunction->terms.append(ByteTerm::CheckInput(count));
     1284        m_bodyDisjunction->terms.append(ByteTerm::CheckInput(count));
    12851285    }
    12861286
    12871287    void assertionBOL(int inputPosition)
    12881288    {
    1289         bodyDisjunction->terms.append(ByteTerm::BOL(inputPosition));
     1289        m_bodyDisjunction->terms.append(ByteTerm::BOL(inputPosition));
    12901290    }
    12911291
    12921292    void assertionEOL(int inputPosition)
    12931293    {
    1294         bodyDisjunction->terms.append(ByteTerm::EOL(inputPosition));
     1294        m_bodyDisjunction->terms.append(ByteTerm::EOL(inputPosition));
    12951295    }
    12961296
    12971297    void assertionWordBoundary(bool invert, int inputPosition)
    12981298    {
    1299         bodyDisjunction->terms.append(ByteTerm::WordBoundary(invert, inputPosition));
     1299        m_bodyDisjunction->terms.append(ByteTerm::WordBoundary(invert, inputPosition));
    13001300    }
    13011301
     
    13051305            UChar lo = Unicode::toLower(ch);
    13061306            UChar hi = Unicode::toUpper(ch);
    1307            
     1307
    13081308            if (lo != hi) {
    1309                 bodyDisjunction->terms.append(ByteTerm(lo, hi, inputPosition, frameLocation, quantityCount, quantityType));
     1309                m_bodyDisjunction->terms.append(ByteTerm(lo, hi, inputPosition, frameLocation, quantityCount, quantityType));
    13101310                return;
    13111311            }
    13121312        }
    13131313
    1314         bodyDisjunction->terms.append(ByteTerm(ch, inputPosition, frameLocation, quantityCount, quantityType));
    1315     }
    1316    
     1314        m_bodyDisjunction->terms.append(ByteTerm(ch, inputPosition, frameLocation, quantityCount, quantityType));
     1315    }
     1316
    13171317    void atomCharacterClass(CharacterClass* characterClass, bool invert, int inputPosition, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType)
    13181318    {
    1319         bodyDisjunction->terms.append(ByteTerm(characterClass, invert, inputPosition));
    1320 
    1321         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].atom.quantityCount = quantityCount;
    1322         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].atom.quantityType = quantityType;
    1323         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
     1319        m_bodyDisjunction->terms.append(ByteTerm(characterClass, invert, inputPosition));
     1320
     1321        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].atom.quantityCount = quantityCount;
     1322        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].atom.quantityType = quantityType;
     1323        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
    13241324    }
    13251325
     
    13281328        ASSERT(subpatternId);
    13291329
    1330         bodyDisjunction->terms.append(ByteTerm::BackReference(subpatternId, inputPosition));
    1331 
    1332         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].atom.quantityCount = quantityCount;
    1333         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].atom.quantityType = quantityType;
    1334         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
     1330        m_bodyDisjunction->terms.append(ByteTerm::BackReference(subpatternId, inputPosition));
     1331
     1332        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].atom.quantityCount = quantityCount;
     1333        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].atom.quantityType = quantityType;
     1334        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
    13351335    }
    13361336
    13371337    void atomParenthesesSubpatternBegin(unsigned subpatternId, bool capture, int inputPosition, unsigned frameLocation, unsigned alternativeFrameLocation)
    13381338    {
    1339         int beginTerm = bodyDisjunction->terms.size();
    1340 
    1341         bodyDisjunction->terms.append(ByteTerm(ByteTerm::TypeParenthesesSubpatternOnceBegin, subpatternId, capture, inputPosition));
    1342         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
    1343         bodyDisjunction->terms.append(ByteTerm::AlternativeBegin());
    1344         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].frameLocation = alternativeFrameLocation;
    1345 
    1346         m_parenthesesStack.append(ParenthesesStackEntry(beginTerm, currentAlternativeIndex));
    1347         currentAlternativeIndex = beginTerm + 1;
     1339        int beginTerm = m_bodyDisjunction->terms.size();
     1340
     1341        m_bodyDisjunction->terms.append(ByteTerm(ByteTerm::TypeParenthesesSubpatternOnceBegin, subpatternId, capture, inputPosition));
     1342        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
     1343        m_bodyDisjunction->terms.append(ByteTerm::AlternativeBegin());
     1344        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].frameLocation = alternativeFrameLocation;
     1345
     1346        m_parenthesesStack.append(ParenthesesStackEntry(beginTerm, m_currentAlternativeIndex));
     1347        m_currentAlternativeIndex = beginTerm + 1;
    13481348    }
    13491349
    13501350    void atomParentheticalAssertionBegin(unsigned subpatternId, bool invert, unsigned frameLocation, unsigned alternativeFrameLocation)
    13511351    {
    1352         int beginTerm = bodyDisjunction->terms.size();
    1353 
    1354         bodyDisjunction->terms.append(ByteTerm(ByteTerm::TypeParentheticalAssertionBegin, subpatternId, invert, 0));
    1355         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
    1356         bodyDisjunction->terms.append(ByteTerm::AlternativeBegin());
    1357         bodyDisjunction->terms[bodyDisjunction->terms.size() - 1].frameLocation = alternativeFrameLocation;
    1358 
    1359         m_parenthesesStack.append(ParenthesesStackEntry(beginTerm, currentAlternativeIndex));
    1360         currentAlternativeIndex = beginTerm + 1;
     1352        int beginTerm = m_bodyDisjunction->terms.size();
     1353
     1354        m_bodyDisjunction->terms.append(ByteTerm(ByteTerm::TypeParentheticalAssertionBegin, subpatternId, invert, 0));
     1355        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].frameLocation = frameLocation;
     1356        m_bodyDisjunction->terms.append(ByteTerm::AlternativeBegin());
     1357        m_bodyDisjunction->terms[m_bodyDisjunction->terms.size() - 1].frameLocation = alternativeFrameLocation;
     1358
     1359        m_parenthesesStack.append(ParenthesesStackEntry(beginTerm, m_currentAlternativeIndex));
     1360        m_currentAlternativeIndex = beginTerm + 1;
    13611361    }
    13621362
     
    13661366        int stackEnd = m_parenthesesStack.size() - 1;
    13671367        unsigned beginTerm = m_parenthesesStack[stackEnd].beginTerm;
    1368         currentAlternativeIndex = m_parenthesesStack[stackEnd].savedAlternativeIndex;
     1368        m_currentAlternativeIndex = m_parenthesesStack[stackEnd].savedAlternativeIndex;
    13691369        m_parenthesesStack.shrink(stackEnd);
    13701370
    1371         ASSERT(beginTerm < bodyDisjunction->terms.size());
    1372         ASSERT(currentAlternativeIndex < bodyDisjunction->terms.size());
    1373        
     1371        ASSERT(beginTerm < m_bodyDisjunction->terms.size());
     1372        ASSERT(m_currentAlternativeIndex < m_bodyDisjunction->terms.size());
     1373
    13741374        return beginTerm;
    13751375    }
     
    13881388    {
    13891389        int origBeginTerm = beginTerm;
    1390         ASSERT(bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeAlternativeBegin);
    1391         int endIndex = bodyDisjunction->terms.size();
    1392 
    1393         unsigned frameLocation = bodyDisjunction->terms[beginTerm].frameLocation;
    1394 
    1395         if (!bodyDisjunction->terms[beginTerm].alternative.next)
    1396             bodyDisjunction->terms.remove(beginTerm);
     1390        ASSERT(m_bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeAlternativeBegin);
     1391        int endIndex = m_bodyDisjunction->terms.size();
     1392
     1393        unsigned frameLocation = m_bodyDisjunction->terms[beginTerm].frameLocation;
     1394
     1395        if (!m_bodyDisjunction->terms[beginTerm].alternative.next)
     1396            m_bodyDisjunction->terms.remove(beginTerm);
    13971397        else {
    1398             while (bodyDisjunction->terms[beginTerm].alternative.next) {
    1399                 beginTerm += bodyDisjunction->terms[beginTerm].alternative.next;
    1400                 ASSERT(bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeAlternativeDisjunction);
    1401                 bodyDisjunction->terms[beginTerm].alternative.end = endIndex - beginTerm;
    1402                 bodyDisjunction->terms[beginTerm].frameLocation = frameLocation;
    1403             }
    1404            
    1405             bodyDisjunction->terms[beginTerm].alternative.next = origBeginTerm - beginTerm;
    1406 
    1407             bodyDisjunction->terms.append(ByteTerm::AlternativeEnd());
    1408             bodyDisjunction->terms[endIndex].frameLocation = frameLocation;
     1398            while (m_bodyDisjunction->terms[beginTerm].alternative.next) {
     1399                beginTerm += m_bodyDisjunction->terms[beginTerm].alternative.next;
     1400                ASSERT(m_bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeAlternativeDisjunction);
     1401                m_bodyDisjunction->terms[beginTerm].alternative.end = endIndex - beginTerm;
     1402                m_bodyDisjunction->terms[beginTerm].frameLocation = frameLocation;
     1403            }
     1404
     1405            m_bodyDisjunction->terms[beginTerm].alternative.next = origBeginTerm - beginTerm;
     1406
     1407            m_bodyDisjunction->terms.append(ByteTerm::AlternativeEnd());
     1408            m_bodyDisjunction->terms[endIndex].frameLocation = frameLocation;
    14091409        }
    14101410    }
     
    14141414        int beginTerm = 0;
    14151415        int origBeginTerm = 0;
    1416         ASSERT(bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeBodyAlternativeBegin);
    1417         int endIndex = bodyDisjunction->terms.size();
    1418 
    1419         unsigned frameLocation = bodyDisjunction->terms[beginTerm].frameLocation;
    1420 
    1421         while (bodyDisjunction->terms[beginTerm].alternative.next) {
    1422             beginTerm += bodyDisjunction->terms[beginTerm].alternative.next;
    1423             ASSERT(bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeBodyAlternativeDisjunction);
    1424             bodyDisjunction->terms[beginTerm].alternative.end = endIndex - beginTerm;
    1425             bodyDisjunction->terms[beginTerm].frameLocation = frameLocation;
    1426         }
    1427        
    1428         bodyDisjunction->terms[beginTerm].alternative.next = origBeginTerm - beginTerm;
    1429 
    1430         bodyDisjunction->terms.append(ByteTerm::BodyAlternativeEnd());
    1431         bodyDisjunction->terms[endIndex].frameLocation = frameLocation;
     1416        ASSERT(m_bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeBodyAlternativeBegin);
     1417        int endIndex = m_bodyDisjunction->terms.size();
     1418
     1419        unsigned frameLocation = m_bodyDisjunction->terms[beginTerm].frameLocation;
     1420
     1421        while (m_bodyDisjunction->terms[beginTerm].alternative.next) {
     1422            beginTerm += m_bodyDisjunction->terms[beginTerm].alternative.next;
     1423            ASSERT(m_bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeBodyAlternativeDisjunction);
     1424            m_bodyDisjunction->terms[beginTerm].alternative.end = endIndex - beginTerm;
     1425            m_bodyDisjunction->terms[beginTerm].frameLocation = frameLocation;
     1426        }
     1427
     1428        m_bodyDisjunction->terms[beginTerm].alternative.next = origBeginTerm - beginTerm;
     1429
     1430        m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeEnd());
     1431        m_bodyDisjunction->terms[endIndex].frameLocation = frameLocation;
    14321432    }
    14331433
     
    14361436        unsigned beginTerm = popParenthesesStack();
    14371437        closeAlternative(beginTerm + 1);
    1438         unsigned endTerm = bodyDisjunction->terms.size();
    1439 
    1440         bool isAssertion = bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeParentheticalAssertionBegin;
    1441         bool invertOrCapture = bodyDisjunction->terms[beginTerm].invertOrCapture;
    1442         unsigned subpatternId = bodyDisjunction->terms[beginTerm].atom.subpatternId;
    1443 
    1444         bodyDisjunction->terms.append(ByteTerm(isAssertion ? ByteTerm::TypeParentheticalAssertionEnd : ByteTerm::TypeParenthesesSubpatternOnceEnd, subpatternId, invertOrCapture, inputPosition));
    1445         bodyDisjunction->terms[beginTerm].atom.parenthesesWidth = endTerm - beginTerm;
    1446         bodyDisjunction->terms[endTerm].atom.parenthesesWidth = endTerm - beginTerm;
    1447         bodyDisjunction->terms[endTerm].frameLocation = frameLocation;
     1438        unsigned endTerm = m_bodyDisjunction->terms.size();
     1439
     1440        bool isAssertion = m_bodyDisjunction->terms[beginTerm].type == ByteTerm::TypeParentheticalAssertionBegin;
     1441        bool invertOrCapture = m_bodyDisjunction->terms[beginTerm].invertOrCapture;
     1442        unsigned subpatternId = m_bodyDisjunction->terms[beginTerm].atom.subpatternId;
     1443
     1444        m_bodyDisjunction->terms.append(ByteTerm(isAssertion ? ByteTerm::TypeParentheticalAssertionEnd : ByteTerm::TypeParenthesesSubpatternOnceEnd, subpatternId, invertOrCapture, inputPosition));
     1445        m_bodyDisjunction->terms[beginTerm].atom.parenthesesWidth = endTerm - beginTerm;
     1446        m_bodyDisjunction->terms[endTerm].atom.parenthesesWidth = endTerm - beginTerm;
     1447        m_bodyDisjunction->terms[endTerm].frameLocation = frameLocation;
    14481448
    14491449        if (doInline) {
    1450             bodyDisjunction->terms[beginTerm].atom.quantityCount = quantityCount;
    1451             bodyDisjunction->terms[beginTerm].atom.quantityType = quantityType;
    1452             bodyDisjunction->terms[endTerm].atom.quantityCount = quantityCount;
    1453             bodyDisjunction->terms[endTerm].atom.quantityType = quantityType;
     1450            m_bodyDisjunction->terms[beginTerm].atom.quantityCount = quantityCount;
     1451            m_bodyDisjunction->terms[beginTerm].atom.quantityType = quantityType;
     1452            m_bodyDisjunction->terms[endTerm].atom.quantityCount = quantityCount;
     1453            m_bodyDisjunction->terms[endTerm].atom.quantityType = quantityType;
    14541454        } else {
    1455             ByteTerm& parenthesesBegin = bodyDisjunction->terms[beginTerm];
     1455            ByteTerm& parenthesesBegin = m_bodyDisjunction->terms[beginTerm];
    14561456            ASSERT(parenthesesBegin.type == ByteTerm::TypeParenthesesSubpatternOnceBegin);
    14571457
     
    14641464            parenthesesDisjunction->terms.append(ByteTerm::SubpatternBegin());
    14651465            for (unsigned termInParentheses = beginTerm + 1; termInParentheses < endTerm; ++termInParentheses)
    1466                 parenthesesDisjunction->terms.append(bodyDisjunction->terms[termInParentheses]);
     1466                parenthesesDisjunction->terms.append(m_bodyDisjunction->terms[termInParentheses]);
    14671467            parenthesesDisjunction->terms.append(ByteTerm::SubpatternEnd());
    14681468
    1469             bodyDisjunction->terms.shrink(beginTerm);
     1469            m_bodyDisjunction->terms.shrink(beginTerm);
    14701470
    14711471            m_allParenthesesInfo.append(parenthesesDisjunction);
    1472             bodyDisjunction->terms.append(ByteTerm(ByteTerm::TypeParenthesesSubpattern, subpatternId, parenthesesDisjunction, invertOrCapture, inputPosition));
    1473 
    1474             bodyDisjunction->terms[beginTerm].atom.quantityCount = quantityCount;
    1475             bodyDisjunction->terms[beginTerm].atom.quantityType = quantityType;
    1476             bodyDisjunction->terms[beginTerm].frameLocation = frameLocation;
     1472            m_bodyDisjunction->terms.append(ByteTerm(ByteTerm::TypeParenthesesSubpattern, subpatternId, parenthesesDisjunction, invertOrCapture, inputPosition));
     1473
     1474            m_bodyDisjunction->terms[beginTerm].atom.quantityCount = quantityCount;
     1475            m_bodyDisjunction->terms[beginTerm].atom.quantityType = quantityType;
     1476            m_bodyDisjunction->terms[beginTerm].frameLocation = frameLocation;
    14771477        }
    14781478    }
     
    14801480    void regexBegin(unsigned numSubpatterns, unsigned callFrameSize)
    14811481    {
    1482         bodyDisjunction = new ByteDisjunction(numSubpatterns, callFrameSize);
    1483         bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin());
    1484         bodyDisjunction->terms[0].frameLocation = 0;
    1485         currentAlternativeIndex = 0;
     1482        m_bodyDisjunction = new ByteDisjunction(numSubpatterns, callFrameSize);
     1483        m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin());
     1484        m_bodyDisjunction->terms[0].frameLocation = 0;
     1485        m_currentAlternativeIndex = 0;
    14861486    }
    14871487
     
    14931493    void alterantiveBodyDisjunction()
    14941494    {
    1495         int newAlternativeIndex = bodyDisjunction->terms.size();
    1496         bodyDisjunction->terms[currentAlternativeIndex].alternative.next = newAlternativeIndex - currentAlternativeIndex;
    1497         bodyDisjunction->terms.append(ByteTerm::BodyAlternativeDisjunction());
    1498 
    1499         currentAlternativeIndex = newAlternativeIndex;
     1495        int newAlternativeIndex = m_bodyDisjunction->terms.size();
     1496        m_bodyDisjunction->terms[m_currentAlternativeIndex].alternative.next = newAlternativeIndex - m_currentAlternativeIndex;
     1497        m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeDisjunction());
     1498
     1499        m_currentAlternativeIndex = newAlternativeIndex;
    15001500    }
    15011501
    15021502    void alterantiveDisjunction()
    15031503    {
    1504         int newAlternativeIndex = bodyDisjunction->terms.size();
    1505         bodyDisjunction->terms[currentAlternativeIndex].alternative.next = newAlternativeIndex - currentAlternativeIndex;
    1506         bodyDisjunction->terms.append(ByteTerm::AlternativeDisjunction());
    1507 
    1508         currentAlternativeIndex = newAlternativeIndex;
     1504        int newAlternativeIndex = m_bodyDisjunction->terms.size();
     1505        m_bodyDisjunction->terms[m_currentAlternativeIndex].alternative.next = newAlternativeIndex - m_currentAlternativeIndex;
     1506        m_bodyDisjunction->terms.append(ByteTerm::AlternativeDisjunction());
     1507
     1508        m_currentAlternativeIndex = newAlternativeIndex;
    15091509    }
    15101510
     
    15131513        for (unsigned alt = 0; alt < disjunction->m_alternatives.size(); ++alt) {
    15141514            unsigned currentCountAlreadyChecked = inputCountAlreadyChecked;
    1515        
     1515
    15161516            if (alt) {
    15171517                if (disjunction == m_pattern.m_body)
     
    15871587                case PatternTerm::TypeParentheticalAssertion: {
    15881588                    unsigned alternativeFrameLocation = term.inputPosition + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
    1589                    
     1589
    15901590                    atomParentheticalAssertionBegin(term.parentheses.subpatternId, term.invertOrCapture, term.frameLocation, alternativeFrameLocation);
    15911591                    emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, 0);
     
    16001600private:
    16011601    RegexPattern& m_pattern;
    1602     ByteDisjunction* bodyDisjunction;
    1603     unsigned currentAlternativeIndex;
     1602    ByteDisjunction* m_bodyDisjunction;
     1603    unsigned m_currentAlternativeIndex;
    16041604    Vector<ParenthesesStackEntry> m_parenthesesStack;
    16051605    Vector<ByteDisjunction*> m_allParenthesesInfo;
Note: See TracChangeset for help on using the changeset viewer.