• benjamin@webkit.org's avatar
    Add class matching to the Selector Code Generator · 3a722540
    benjamin@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=126176
    
    Source/JavaScriptCore: 
    
    Reviewed by Antti Koivisto and Oliver Hunt.
    
    Add test and branch based on BaseIndex addressing for x86_64.
    Fast loops are needed to compete with clang on tight loops.
    
    * assembler/MacroAssembler.h:
    * assembler/MacroAssemblerX86_64.h:
    (JSC::MacroAssemblerX86_64::branch64):
    (JSC::MacroAssemblerX86_64::branchPtr):
    * assembler/X86Assembler.h:
    (JSC::X86Assembler::cmpq_rm):
    
    Source/WebCore: 
    
    Reviewed by Antti Koivisto.
    
    Add selector matching based on classname to the Selector Compiler.
    
    * cssjit/SelectorCompiler.cpp:
    (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
    (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
    (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses):
    * dom/ElementData.h:
    (WebCore::ElementData::classNamesMemoryOffset):
    * dom/SpaceSplitString.h:
    (WebCore::SpaceSplitStringData::sizeMemoryOffset):
    (WebCore::SpaceSplitStringData::tokensMemoryOffset):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    3a722540