Last Comment Bug 568734 - Some decompiled code with sharps does not compile
: Some decompiled code with sharps does not compile
Status: RESOLVED FIXED
: testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- minor (vote)
: ---
Assigned To: general
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: jsfunfuzz
  Show dependency treegraph
 
Reported: 2010-05-27 18:26 PDT by Jesse Ruderman
Modified: 2012-02-17 16:12 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Jesse Ruderman 2010-05-27 18:26:12 PDT
jsfunfuzz discovered this quickly after I let it know that bug 367731 was marked as WFM.

js> (function () {#1=(a = b);})
(function () {#1=a = b;})

js> (function () {#1=a = b;})   
typein:10: SyntaxError: invalid assignment left-hand side:
typein:10: (function () {#1=a = b;})
typein:10: ...................^
Comment 1 Biju 2010-05-30 23:57:56 PDT
//problem is in another case 
// say following 
(function () {x={a:x=(a = b, 1)};})
;// give ==>
(function () {x = {a: x = (a = b, 1)};})
;// give ==>
(function () {x = {a: x = (a = b, 1)};})

; // but 

(function () {x={a:#1=(a = b, a)};})
; // gives ==>
(function () { x = {a: #1=a = b, a};})
; // gives ==>
// error invalid assignment left-hand side

issue exist even in 
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.5pre) 
Gecko/20100530 Namoroka/3.6.5pre
Comment 2 Biju 2010-05-30 23:58:37 PDT
// original case work around 
(function () {#1=(a = b);})
;// make it as ==>
(function () {a =(#1=b);})
;// gives ==>
(function () {a = #1=b;})
;// gives ==>
(function () {a = #1=b;})
;
Comment 3 Gary Kwong [:gkw] [:nth10sd] 2012-02-17 16:12:22 PST
Fixed by bug 566700, the removal of sharp variables.

Note You need to log in before you can comment on or make changes to this bug.