2010-04-20 Oliver Hunt <oliver@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Apr 2010 22:05:43 +0000 (22:05 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Apr 2010 22:05:43 +0000 (22:05 +0000)
commit5ff4a94484b278303eb241f27001631c16fcf0b0
tree639f32ff9c47d58c1e05f73d67a000e07d55ad89
parentf4fe01ecd932ff1412547143b566188076dbe8c9
2010-04-20  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Autogenerate yarr character tables
        https://bugs.webkit.org/show_bug.cgi?id=37877

        Use a python script to automatically generate character tables
        for the builtin YARR character classes.  This allows us to generate
        actual tables as well, by using these tables we can both increase
        performance of the check (for complex builtins) and reduce the actual
        code size.

        4-8% win on string-unpack-code, but lots of noise on other tests so
        i'm only confident saying its a 1% win overall.

        * DerivedSources.make:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * assembler/AbstractMacroAssembler.h:
        (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress):
        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::branchTest8):
        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::branchTest8):
        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::branchTest8):
        * assembler/X86Assembler.h:
        (JSC::X86Assembler::cmpb_im):
        (JSC::X86Assembler::testb_im):
        * bytecode/SamplingTool.cpp:
        (JSC::SamplingTool::dump):
        * create_regex_tables: Added.
        * yarr/RegexCompiler.cpp:
        (JSC::Yarr::CharacterClassConstructor::charClass):
        * yarr/RegexJIT.cpp:
        (JSC::Yarr::RegexGenerator::matchCharacterClass):
        (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
        (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
        (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
        * yarr/RegexPattern.h:
        (JSC::Yarr::CharacterClassTable::create):
        (JSC::Yarr::CharacterClassTable::CharacterClassTable):
        (JSC::Yarr::CharacterClass::CharacterClass):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/DerivedSources.make
JavaScriptCore/DerivedSources.pro
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/assembler/AbstractMacroAssembler.h
JavaScriptCore/assembler/MacroAssembler.h
JavaScriptCore/assembler/MacroAssemblerX86Common.h
JavaScriptCore/assembler/MacroAssemblerX86_64.h
JavaScriptCore/assembler/X86Assembler.h
JavaScriptCore/bytecode/SamplingTool.cpp
JavaScriptCore/create_regex_tables [new file with mode: 0644]
JavaScriptCore/yarr/RegexCompiler.cpp
JavaScriptCore/yarr/RegexJIT.cpp
JavaScriptCore/yarr/RegexPattern.h