[Webkit-unassigned] [Bug 125122] New: DFG logic mixes boolean and binary operations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 2 16:58:15 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=125122

           Summary: DFG logic mixes boolean and binary operations
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bfulgham at webkit.org


DFGCommon generates a bunch of warnings when built under Windows:

7>c:\projects\webkit\opensource\source\javascriptcore\dfg\DFGCommon.h(216): warning C4805: '==' : unsafe mix of type 'bool' and type 'int' in operation
7>          c:\projects\webkit\opensource\source\javascriptcore\dfg\DFGVariableAccessData.h(96) : see reference to function template instantiation 'bool JSC::DFG::checkAndSet<bool,int>(T &,U)' being compiled

The offending code in DFGVariableAccessData looks like this:

    bool mergeIsCaptured(bool isCaptured)
    {
        return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | isCaptured)
            | checkAndSet(m_isCaptured, m_isCaptured | isCaptured);
    }


MSVC seems to be promoting the two boolean types in the binary OR operation (e.g., m_shouldNeverUnbox | isCaptured) to integer type, which is then passed to checkAndSet, resulting in a comparison of bool to integer.

Probably harmless, but an annoying warning.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list