Skip to content
  • abarth@webkit.org's avatar
    HTMLNames should construct strings at compile time · 5f610706
    abarth@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=112831
    
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    This patch teaches make_names how to construct strings at compile time,
    eliminating a large number of startup mallocs.
    
    * WebCore.gyp/WebCore.gyp:
    * WebCore.gyp/scripts/action_makenames.py:
        - Teach the Chromium build how to deal with Perl modules.
    * bindings/scripts/StaticString.pm: Added.
        - A Perl module for constructing static strings.
    (GenerateStrings):
    (GenerateValidateStrings):
    * dom/QualifiedName.cpp:
    (WebCore::createQualifiedName):
        - createQualifiedName now takes an already-constructed StringImpl
          object.
    * dom/QualifiedName.h:
    * dom/make_names.pl:
    (valueForName):
    (namesToStrings):
    (printNamesCppFile):
    (printDefinitions):
        - Teach make_names how to use StaticString.pm.
    
    Source/WTF:
    
    * wtf/text/StringImpl.h:
    (StringImpl):
    (StaticASCIILiteral):
        - This struct lets us construct StringImpl objects at compile time.
    (WTF::StringImpl::assertValidHash):
        - This function lets us sanity check StringImpl objects created from StaticData.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5f610706