WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED FIXED
Bug 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
2007-08-07 20:28:24 PDT
> (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
2007-08-07 20:32:40 PDT
> (function(){a + +b;}).toString()
function(){a++b;} Which is also wrong.
Jesse Ruderman
Comment 2
2007-08-07 20:38:49 PDT
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
2007-08-07 22:46:34 PDT
<
rdar://problem/5394405
>
Sam Weinig
Comment 4
2007-08-07 22:47:42 PDT
Fix landed in
r24924
Oliver Hunt
Comment 5
2007-08-07 23:35:07 PDT
***
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