2011-06-03 Oliver Hunt <oliver@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2011 23:30:22 +0000 (23:30 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2011 23:30:22 +0000 (23:30 +0000)
commit52a118847287729359bad2c1b7d5e9b36a9bd0b6
treeec25762c672ca84a3cf731f45a222c9312b99ab1
parent9fa84722301e9c1c1af1979b6627feb48621257d
2011-06-03  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Improve keyword lookup
        https://bugs.webkit.org/show_bug.cgi?id=61913

        Rather than doing multiple hash lookups as we currently
        do when trying to identify keywords we now use an
        automatically generated decision tree (essentially it's
        a hard coded patricia trie).  We still use the regular
        lookup table for the last few characters of an input as
        this allows us to completely skip all bounds checks.

        * CMakeLists.txt:
        * DerivedSources.make:
        * DerivedSources.pro:
        * GNUmakefile.am:
        * JavaScriptCore.gyp/JavaScriptCore.gyp:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * KeywordLookupGenerator.py: Added.
        * make-generated-sources.sh:
        * parser/Lexer.cpp:
        (JSC::Lexer::internalShift):
        (JSC::Lexer::shift):
        (JSC::Lexer::parseIdentifier):
        * parser/Lexer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/DerivedSources.make
Source/JavaScriptCore/DerivedSources.pro
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/KeywordLookupGenerator.py [new file with mode: 0644]
Source/JavaScriptCore/make-generated-sources.sh
Source/JavaScriptCore/parser/Lexer.cpp
Source/JavaScriptCore/parser/Lexer.h