-
abarth@webkit.org authored
Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 This patch changes us from using a jump table for each character to using absolute jumps between parser states. This appears to be about a 1% improvement on the parser bench mark (which is 1/10th of what we need to catch the old parser). I've kept the underlying logic as close to the old logic as possible. This new form will make it easier to handle the input stream part of the spec and to make further performance improvements. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitCurrentToken): * html/HTML5Lexer.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9e58a901