Bug 137844

Summary: [EFL] build break occurs on webkit efl build.
Product: WebKit Reporter: KwangHyuk <hyuki.kim>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: benjamin, cdumez, commit-queue, gyuyoung.kim, lucas.de.marchi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Bug Depends on: 137802    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description KwangHyuk 2014-10-17 20:03:57 PDT
build break occurs on webkit efl build.

/home/hyuki/git/open/webkit/Source/WebCore/cssjit/SelectorCompiler.cpp: In member function ‘void WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList(JSC::AbstractMacroAssembler<JSC::X86Assembler>::JumpList&, JSC::AbstractMacroAssembler<JSC::X86Assembler>::RegisterID, const WebCore::SelectorCompiler::SelectorList&)’:
/home/hyuki/git/open/webkit/Source/WebCore/cssjit/SelectorCompiler.cpp:1700:14: error: variable ‘elementAddressRegisterIndex’ set but not used [-Werror=unused-but-set-variable]
     unsigned elementAddressRegisterIndex = std::numeric_limits<unsigned>::max();
              ^
cc1plus: all warnings being treated as errors
make[2]: *** [Source/WebCore/CMakeFiles/WebCore.dir/cssjit/SelectorCompiler.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Source/WebCore/CMakeFiles/WebCore.dir/all] Error 2
make: *** [all] Error 2
Comment 1 KwangHyuk 2014-10-17 20:11:25 PDT
Created attachment 240056 [details]
Patch
Comment 2 Chris Dumez 2014-10-17 21:42:22 PDT
Comment on attachment 240056 [details]
Patch

I believe this was fixed already?
Comment 3 KwangHyuk 2014-10-18 01:59:34 PDT
(In reply to comment #2)
> Comment on attachment 240056 [details]
> Patch
> 
> I believe this was fixed already?

(In reply to comment #2)
> Comment on attachment 240056 [details]
> Patch
> 
> I believe this was fixed already?


Unfortunately, Nobody touch it yet.

unused-but-set-variable. :)
Could you see the code below ?

    unsigned elementAddressRegisterIndex = std::numeric_limits<unsigned>::max();
    unsigned elementToTestIndex = std::numeric_limits<unsigned>::max();
    bool isElementToMatchOnStack = false;
    if (selectorList.clobberElementAddressRegister) {
        if (elementToMatch != elementAddressRegister) {
            registersToSave.append(elementAddressRegister);
            registersToSave.append(elementToMatch);
            elementAddressRegisterIndex = 0;
            elementToTestIndex = 1;
            isElementToMatchOnStack = true;
        } else {
            registersToSave.append(elementAddressRegister);
            elementAddressRegisterIndex = 0;
            elementToTestIndex = 0;
        }
    } else if (elementToMatch != elementAddressRegister) {
        registersToSave.append(elementAddressRegister);
        elementAddressRegisterIndex = 0;
    }
Comment 4 Gyuyoung Kim 2014-10-18 02:16:17 PDT
Comment on attachment 240056 [details]
Patch

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

> Source/WebCore/cssjit/SelectorCompiler.cpp:1701
> +    unsigned elementToTestIndex = elementAddressRegisterIndex;

I'm not sure whether this is correct fix. I think Benjamin needs to take a look this.
Comment 5 Gyuyoung Kim 2014-10-18 02:17:18 PDT
*** Bug 137847 has been marked as a duplicate of this bug. ***
Comment 6 KwangHyuk 2014-10-18 02:20:45 PDT
(In reply to comment #5)
> *** Bug 137847 has been marked as a duplicate of this bug. ***

This is just for keeping code that any author of this code wrote before without any side-effect. :)
I just want to fix build break for my webkit efl build.
Comment 7 Gyuyoung Kim 2014-10-18 02:39:06 PDT
Comment on attachment 240056 [details]
Patch

I believe that this fix doesn't change behavior. rs=me to fix EFL build break for now.
Comment 8 WebKit Commit Bot 2014-10-18 03:16:33 PDT
Comment on attachment 240056 [details]
Patch

Clearing flags on attachment: 240056

Committed r174859: <http://trac.webkit.org/changeset/174859>
Comment 9 WebKit Commit Bot 2014-10-18 03:16:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Benjamin Poulain 2014-10-18 20:17:44 PDT
I am sorry I broke EFL, I thought the bot was red because of the StackAllocator changes. Thanks for fixing.

I'll clean up that code.