Bug 18869 - SQUIRRELFISH: function toString broken after calling
: SQUIRRELFISH: function toString broken after calling
: WebKit
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
: 18631
  Show dependency treegraph
Reported: 2008-05-03 01:38 PST by
Modified: 2008-05-10 13:40 PST (History)

fix by keeping references to the original source (107.76 KB, patch)
2008-05-10 05:10 PST, Maciej Stachowiak
oliver: review+
Review Patch | Details | Formatted Diff | Diff


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

Description From 2008-05-03 01:38:34 PST
function.toString does not work right after calling the function. This breaks at least the following layout tests:

------- Comment #1 From 2008-05-07 13:17:12 PST -------
On IRC, Maciej said he was working on this.
------- Comment #2 From 2008-05-10 05:10:05 PST -------
Created an attachment (id=21056) [details]
fix by keeping references to the original source
------- Comment #3 From 2008-05-10 12:59:01 PST -------
(From update of attachment 21056 [details])
r=me, although i am concerned about this approach in the long term.  As we are no longer actually decompiling there are two side effects:
* It is no longer possible to use function.toString to "prettify" source which makes debugging google, etc difficult (for us), and there are a number of places i've seen on the web that reference decompilation as a way to reformat JS.
* This renders a number of fuzzers somewhat useless.  JSFunFuzz for instance does roundtrip checks which in general are meant to pick up times when we have compiled code that does one thing into an incorrect form, which we now lose as all we do is regurgitate what we were given.

That said if we start doing significant optimisations and restructuring with the bytecode stream decopmilation may not be entirely helpful.