<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>125122</bug_id>
          
          <creation_ts>2013-12-02 16:56:37 -0800</creation_ts>
          <short_desc>DFG logic mixes boolean and binary operations</short_desc>
          <delta_ts>2015-02-02 16:32:05 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>135205</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>955694</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-12-02 16:56:37 -0800</bug_when>
    <thetext>DFGCommon generates a bunch of warnings when built under Windows:

7&gt;c:\projects\webkit\opensource\source\javascriptcore\dfg\DFGCommon.h(216): warning C4805: &apos;==&apos; : unsafe mix of type &apos;bool&apos; and type &apos;int&apos; in operation
7&gt;          c:\projects\webkit\opensource\source\javascriptcore\dfg\DFGVariableAccessData.h(96) : see reference to function template instantiation &apos;bool JSC::DFG::checkAndSet&lt;bool,int&gt;(T &amp;,U)&apos; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066241</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-02-02 14:47:07 -0800</bug_when>
    <thetext>I think Mark fixed this already. Can you confirm?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066289</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-02-02 16:29:59 -0800</bug_when>
    <thetext>Yes, this is fixed already in ToT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066290</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-02-02 16:32:05 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Yes, this is fixed already in ToT.

Specifically, this was fixed for https://bugs.webkit.org/show_bug.cgi?id=135205 in http://trac.webkit.org/changeset/174371.

*** This bug has been marked as a duplicate of bug 135205 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>