Bug 17013 - JSC can't round trip certain for-loops
Summary: JSC can't round trip certain for-loops
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: HasReduction, Regression
Depends on:
Blocks: 13638
  Show dependency treegraph
 
Reported: 2008-01-25 19:13 PST by Oliver Hunt
Modified: 2008-02-11 17:02 PST (History)
3 users (show)

See Also:


Attachments
patch (5.99 KB, patch)
2008-01-25 22:35 PST, Darin Adler
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-01-25 19:13:53 PST
Given the code
function f(){
    for (var x;;)
        ;
}

f.toString() produces:
function f(){
    var x;
    for (var true;true;true)
        ;
}

in which "Var true" is invalid.

Found by JSFunFuzz
Comment 1 Darin Adler 2008-01-25 22:35:11 PST
Created attachment 18698 [details]
patch
Comment 2 Oliver Hunt 2008-01-26 00:20:07 PST
Comment on attachment 18698 [details]
patch

I wasgoing to suggest making additions to fast/js/function-toString-parentheses.js

But your choice seems much better

r=me
Comment 3 Darin Adler 2008-01-26 01:03:23 PST
Committed revision 29804.