WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED FIXED
14897
Decompilation of double negation fails and produces invalid or incorrect code
https://bugs.webkit.org/show_bug.cgi?id=14897
Summary
Decompilation of double negation fails and produces invalid or incorrect code
Oliver Hunt
Reported
Wednesday, August 8, 2007 4:28:24 AM UTC
> (function() { a - -b; } )
becomes function() {a--b;} and - -b becomes --b Which is also clearly wrong and bad, but *will* compile
Attachments
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
Wednesday, August 8, 2007 4:32:40 AM UTC
> (function(){a + +b;}).toString()
function(){a++b;} Which is also wrong.
Jesse Ruderman
Comment 2
Wednesday, August 8, 2007 4:38:49 AM UTC
FWIW, Mozilla had the same bug and fixed it by always decompiling negation as "- ". See
https://bugzilla.mozilla.org/show_bug.cgi?id=346904
for details.
Sam Weinig
Comment 3
Wednesday, August 8, 2007 6:46:34 AM UTC
<
rdar://problem/5394405
>
Sam Weinig
Comment 4
Wednesday, August 8, 2007 6:47:42 AM UTC
Fix landed in
r24924
Oliver Hunt
Comment 5
Wednesday, August 8, 2007 7:35:07 AM UTC
***
Bug 14892
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug