Changeset 60701 in webkit
- Timestamp:
- Jun 4, 2010 12:44:26 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60699 r60701 1 2010-06-04 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Make HTML5Lexer go fast 6 https://bugs.webkit.org/show_bug.cgi?id=40048 7 8 This patch handles the FLUSH_AND_ADVANCE_TO case. Again, this patch 9 introduces style errors that will be fixed shortly. 10 11 * html/HTML5Lexer.cpp: 12 (WebCore::HTML5Lexer::nextToken): 13 1 14 2010-06-04 Adam Barth <abarth@webkit.org> 2 15 -
trunk/WebCore/html/HTML5Lexer.cpp
r60699 r60701 343 343 } 344 344 345 // When we move away from using a jump table, these macros will be different. 346 #define FLUSH_AND_ADVANCE_TO(stateName) FLUSH_EMIT_AND_RESUME_IN(stateName) 347 345 348 bool HTML5Lexer::nextToken(SegmentedString& source, HTML5Token& token) 346 349 { … … 540 543 if (cc == '\x09' || cc == '\x0A' || cc == '\x0C' || cc == ' ') { 541 544 if (isAppropriateEndTag()) { 542 m_state = BeforeAttributeNameState; 543 maybeFlushBufferedEndTag(); 544 break; 545 FLUSH_AND_ADVANCE_TO(BeforeAttributeNameState); 545 546 } 546 547 } else if (cc == '/') { 547 548 if (isAppropriateEndTag()) { 548 m_state = SelfClosingStartTagState; 549 maybeFlushBufferedEndTag(); 550 break; 549 FLUSH_AND_ADVANCE_TO(SelfClosingStartTagState); 551 550 } 552 551 } else if (cc == '>') { … … 606 605 if (cc == '\x09' || cc == '\x0A' || cc == '\x0C' || cc == ' ') { 607 606 if (isAppropriateEndTag()) { 608 m_state = BeforeAttributeNameState; 609 maybeFlushBufferedEndTag(); 610 break; 607 FLUSH_AND_ADVANCE_TO(BeforeAttributeNameState); 611 608 } 612 609 } else if (cc == '/') { 613 610 if (isAppropriateEndTag()) { 614 m_state = SelfClosingStartTagState; 615 maybeFlushBufferedEndTag(); 616 break; 611 FLUSH_AND_ADVANCE_TO(SelfClosingStartTagState); 617 612 } 618 613 } else if (cc == '>') { … … 676 671 if (cc == '\x09' || cc == '\x0A' || cc == '\x0C' || cc == ' ') { 677 672 if (isAppropriateEndTag()) { 678 m_state = BeforeAttributeNameState; 679 maybeFlushBufferedEndTag(); 680 break; 673 FLUSH_AND_ADVANCE_TO(BeforeAttributeNameState); 681 674 } 682 675 } else if (cc == '/') { 683 676 if (isAppropriateEndTag()) { 684 m_state = SelfClosingStartTagState; 685 maybeFlushBufferedEndTag(); 686 break; 677 FLUSH_AND_ADVANCE_TO(SelfClosingStartTagState); 687 678 } 688 679 } else if (cc == '>') { … … 821 812 if (cc == '\x09' || cc == '\x0A' || cc == '\x0C' || cc == ' ') { 822 813 if (isAppropriateEndTag()) { 823 m_state = BeforeAttributeNameState; 824 maybeFlushBufferedEndTag(); 825 break; 814 FLUSH_AND_ADVANCE_TO(BeforeAttributeNameState); 826 815 } 827 816 } else if (cc == '/') { 828 817 if (isAppropriateEndTag()) { 829 m_state = SelfClosingStartTagState; 830 maybeFlushBufferedEndTag(); 831 break; 818 FLUSH_AND_ADVANCE_TO(SelfClosingStartTagState); 832 819 } 833 820 } else if (cc == '>') {
Note: See TracChangeset
for help on using the changeset viewer.