Bug 129228 - Compile attribute value matching
Summary: Compile attribute value matching
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-23 01:16 PST by Benjamin Poulain
Modified: 2014-02-27 21:47 PST (History)
12 users (show)

See Also:


Attachments
Patch (46.10 KB, patch)
2014-02-23 01:38 PST, Benjamin Poulain
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2014-02-23 01:16:00 PST
Compile attribute value matching
Comment 1 Benjamin Poulain 2014-02-23 01:38:39 PST
Created attachment 224995 [details]
Patch
Comment 2 Geoffrey Garen 2014-02-24 15:28:50 PST
Comment on attachment 224995 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=224995&action=review

r=me

> Source/WebCore/cssjit/FunctionCall.h:85
> +        // x86 can swap without side effect. On other platforms, we need to be careful with the registers we use.

I think you mean "swap without a temporary register".

On other platforms, we need to allocate a register, and avoid conflicts with other allocated registers.

> Source/WebCore/cssjit/FunctionCall.h:99
> +            JSC::MacroAssembler::RegisterID freeRegister;
> +            for (unsigned i = 0; i < m_registerAllocator.allocatedRegisters().size(); ++i) {

It looks funny, at first glance, to assign from something called "allocated registers" into something called "freeRegister". how about renaming "freeRegister" to "pushedRegister"?

> Source/WebCore/cssjit/SelectorCompiler.cpp:401
> +static inline bool attributeValueTestingRequiresExtraRegister(const AttributeMatchingInfo& attributeInfo)

Should we call this "attributeValueTestingRequiresCaseFoldingRegister"?

> Source/WebCore/cssjit/SelectorCompiler.cpp:1172
> +    // We make the assumption that name matching fails in most case and we keep value matching outside

"cases"

> Source/WebCore/cssjit/SelectorCompiler.cpp:1189
> +    if (attributeSelector.m_match == CSSSelector::Exact)

Can we make this an ASSERT?
Comment 3 Benjamin Poulain 2014-02-27 21:47:03 PST
Committed r164852: <http://trac.webkit.org/changeset/164852>