Changeset 76133 in webkit
- Timestamp:
- Jan 19, 2011 9:58:15 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76131 r76133 1 2011-01-19 Michael Saboff <msaboff@apple.com> 2 3 Reviewed by Darin Adler. 4 5 <rdar://problem/8882994> Regression: Simple nested backtrack hangs 6 https://bugs.webkit.org/show_bug.cgi?id=52675 7 8 New tests to support change. 9 10 * fast/regex/parentheses-expected.txt: 11 * fast/regex/script-tests/parentheses.js: 12 1 13 2011-01-19 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/LayoutTests/fast/regex/parentheses-expected.txt
r76076 r76133 73 73 PASS regexp42.exec('4321') is ['4','4','4'] 74 74 PASS /(?!(?=r{0}){2,})|((z)?)?/gi.test('') is true 75 PASS regexp43.exec('SSS') is [''] 76 PASS regexp44.exec('SSS') is ['',undefined] 75 77 PASS 'Hi Bob'.match(/(Rob)|(Bob)|(Robert)|(Bobby)/) is ['Bob',undefined,'Bob',undefined,undefined] 76 78 PASS successfullyParsed is true -
trunk/LayoutTests/fast/regex/script-tests/parentheses.js
r76076 r76133 194 194 shouldBeTrue("/(?!(?=r{0}){2,})|((z)?)?/gi.test('')"); 195 195 196 var regexp43 = /(?!(?:\1+s))/; 197 shouldBe("regexp43.exec('SSS')", "['']"); 198 199 var regexp44 = /(?!(?:\3+(s+?)))/gy; 200 shouldBe("regexp44.exec('SSS')", "['',undefined]"); 201 196 202 shouldBe("'Hi Bob'.match(/(Rob)|(Bob)|(Robert)|(Bobby)/)", "['Bob',undefined,'Bob',undefined,undefined]"); 197 203 -
trunk/Source/JavaScriptCore/ChangeLog
r76129 r76133 1 2011-01-19 Michael Saboff <msaboff@apple.com> 2 3 Reviewed by Darin Adler. 4 5 <rdar://problem/8882994> Regression: Simple nested backtrack hangs 6 https://bugs.webkit.org/show_bug.cgi?id=52675 7 8 The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540 9 broke simple backtracking in some cases. Reworked that change to 10 link both jumps and labels. 11 12 * yarr/YarrJIT.cpp: 13 (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel): 14 (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom): 15 (JSC::Yarr::YarrGenerator::generateParenthesesSingle): 16 1 17 2011-01-19 Pavel Podivilov <podivilov@chromium.org> 2 18 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r76076 r76133 619 619 } 620 620 621 bool hasBacktrackToLabel() 622 { 623 return m_backtrackToLabel; 624 } 625 621 626 void setBacktrackJumpList(JumpList* jumpList) 622 627 { … … 997 1002 if (doJump) 998 1003 m_backtrack.jumpToBacktrack(generator, backtrack.getBacktrackJumps()); 1004 1005 if (m_backtrack.isLabel() && backtrack.hasBacktrackToLabel()) 1006 backtrack.linkBacktrackToLabel(m_backtrack.getLabel()); 1007 999 1008 if (backtrack.hasDestination()) { 1000 1009 if (m_backtrack.hasDataLabel()) … … 1655 1664 BacktrackDestination& stateBacktrack = state.getBacktrackDestination(); 1656 1665 1657 // If we have a backtrack label, use it for the parenthesis 1658 if (stateBacktrack.isLabel()) 1659 parenthesesBacktrack.linkBacktrackToLabel(stateBacktrack.getLabel()); 1660 else { 1661 state.propagateBacktrackingFrom(this, parenthesesBacktrack); 1662 stateBacktrack.copyBacktrackToLabel(parenthesesBacktrack); 1663 } 1666 state.propagateBacktrackingFrom(this, parenthesesBacktrack); 1667 stateBacktrack.copyBacktrackToLabel(parenthesesBacktrack); 1664 1668 1665 1669 m_expressionState.decrementParenNestingLevel();
Note: See TracChangeset
for help on using the changeset viewer.