<?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>14897</bug_id>
          
          <creation_ts>2007-08-07 20:28:24 -0700</creation_ts>
          <short_desc>Decompilation of double negation fails and produces invalid or incorrect code</short_desc>
          <delta_ts>2007-08-07 23:35:07 -0700</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>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>13638</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Oliver Hunt">oliver</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jruderman</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2856</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2007-08-07 20:28:24 -0700</bug_when>
    <thetext>&gt; (function() {  a - -b; }  )

becomes

function() {a--b;}

and 
- -b
becomes
--b

Which is also clearly wrong and bad, but *will* compile</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2857</commentid>
    <comment_count>1</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2007-08-07 20:32:40 -0700</bug_when>
    <thetext>&gt; (function(){a + +b;}).toString() 
function(){a++b;}

Which is also wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2858</commentid>
    <comment_count>2</comment_count>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2007-08-07 20:38:49 -0700</bug_when>
    <thetext>FWIW, Mozilla had the same bug and fixed it by always decompiling negation as &quot;- &quot;.  See https://bugzilla.mozilla.org/show_bug.cgi?id=346904 for details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2849</commentid>
    <comment_count>3</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-08-07 22:46:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/5394405&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2844</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-08-07 22:47:42 -0700</bug_when>
    <thetext>Fix landed in r24924</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2847</commentid>
    <comment_count>5</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2007-08-07 23:35:07 -0700</bug_when>
    <thetext>*** Bug 14892 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>