Changeset 76076 in webkit
- Timestamp:
- Jan 18, 2011 3:31:30 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76074 r76076 1 2011-01-18 Michael Saboff <msaboff@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540) 6 https://bugs.webkit.org/show_bug.cgi?id=52540 7 https://bugs.webkit.org/show_bug.cgi?id=52662 8 9 New tests to check for proper linking of parentheses nested under 10 a non-capturing parentheses. 11 12 * fast/regex/parentheses-expected.txt: 13 * fast/regex/script-tests/parentheses.js: 14 1 15 2011-01-18 David Hyatt <hyatt@apple.com> 2 16 -
trunk/LayoutTests/fast/regex/parentheses-expected.txt
r75991 r76076 68 68 PASS regexp40.exec('zPPPz') is ['',undefined,undefined,undefined,''] 69 69 PASS regexp40.exec('zPPPPz') is ['',undefined,undefined,undefined,''] 70 PASS regexp41.exec('Here is a link: http://www.acme.com/our_products/index.html. That is all we want!') is ['http://www.acme.com/our_products/index.html','http://www.acme.com/our_products/index.html','http://','l',undefined] 71 PASS regexp42.exec('') is ['',undefined,undefined] 72 PASS regexp42.exec('4') is ['4','4','4'] 73 PASS regexp42.exec('4321') is ['4','4','4'] 70 74 PASS /(?!(?=r{0}){2,})|((z)?)?/gi.test('') is true 71 75 PASS 'Hi Bob'.match(/(Rob)|(Bob)|(Robert)|(Bobby)/) is ['Bob',undefined,'Bob',undefined,undefined] -
trunk/LayoutTests/fast/regex/script-tests/parentheses.js
r75991 r76076 184 184 shouldBe("regexp40.exec('zPPPPz')", "['',undefined,undefined,undefined,'']"); 185 185 186 var regexp41 = /(([\w\-]+:\/\/?|www[.])[^\s()<>]+(?:([\w\d]+)|([^\[:punct:\]\s()<>\W]|\/)))/; 187 shouldBe("regexp41.exec('Here is a link: http://www.acme.com/our_products/index.html. That is all we want!')", "['http://www.acme.com/our_products/index.html','http://www.acme.com/our_products/index.html','http://','l',undefined]"); 188 189 var regexp42 = /((?:(4)?))?/; 190 shouldBe("regexp42.exec('')", "['',undefined,undefined]"); 191 shouldBe("regexp42.exec('4')", "['4','4','4']"); 192 shouldBe("regexp42.exec('4321')", "['4','4','4']"); 193 186 194 shouldBeTrue("/(?!(?=r{0}){2,})|((z)?)?/gi.test('')"); 187 195 -
trunk/Source/JavaScriptCore/ChangeLog
r76068 r76076 1 2011-01-18 Michael Saboff <msaboff@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540) 6 https://bugs.webkit.org/show_bug.cgi?id=52540 7 https://bugs.webkit.org/show_bug.cgi?id=52662 8 9 Directly use backtrack label with parentheses nested under a 10 non-capturing parentheses. Also linked current parentheses 11 tail code object for possible parens nested within a non-capturing 12 parentheses. 13 14 * yarr/YarrJIT.cpp: 15 (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel): 16 (JSC::Yarr::YarrGenerator::generateParenthesesSingle): 17 1 18 2011-01-18 Daniel Bates <dbates@rim.com> 2 19 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r75991 r76076 749 749 } 750 750 751 void linkBacktrackToLabel(Label backtrackLabel) 752 { 753 if (m_backtrackToLabel) 754 *m_backtrackToLabel = backtrackLabel; 755 } 756 751 757 void linkAlternativeBacktracks(YarrGenerator* generator, bool nextIteration = false) 752 758 { … … 1008 1014 BacktrackDestination* m_linkedBacktrack; 1009 1015 ParenthesesTail* m_parenthesesTail; 1010 1011 1016 }; 1012 1017 … … 1639 1644 1640 1645 TermGenerationState parenthesesState(disjunction, state.checkedTotal); 1646 1647 // Use the current paren Tail to connect the nested parentheses. 1648 parenthesesState.setParenthesesTail(state.getParenthesesTail()); 1649 1641 1650 generateParenthesesDisjunction(state.term(), parenthesesState, alternativeFrameLocation); 1642 1651 // this expects that any backtracks back out of the parentheses will be in the … … 1644 1653 // they will have set an entry point on the parenthesesState's m_backtrackLabel. 1645 1654 BacktrackDestination& parenthesesBacktrack = parenthesesState.getBacktrackDestination(); 1646 state.propagateBacktrackingFrom(this, parenthesesBacktrack); 1647 state.getBacktrackDestination().copyBacktrackToLabel(parenthesesBacktrack); 1655 BacktrackDestination& stateBacktrack = state.getBacktrackDestination(); 1656 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 } 1648 1664 1649 1665 m_expressionState.decrementParenNestingLevel();
Note: See TracChangeset
for help on using the changeset viewer.