Last Comment Bug 590036 - Make eval(json-like string) fast for arrays too
: Make eval(json-like string) fast for arrays too
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- enhancement (vote)
: ---
Assigned To: Tom Schuster [:evilpie]
:
Mentors:
Depends on: 578216
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-23 22:38 PDT by Jesse Ruderman
Modified: 2014-04-25 15:18 PDT (History)
14 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (3.19 KB, patch)
2011-12-04 05:09 PST, Tom Schuster [:evilpie]
jorendorff: review+
Details | Diff | Splinter Review

Description Jesse Ruderman 2010-08-23 22:38:02 PDT
If a string passed to eval starts with '[', it's reasonable to try the JSON parser.  We did this for '(' in bug 578216.
Comment 1 Nicholas Nethercote [:njn] 2010-08-23 22:46:26 PDT
We should work out the test failures in bug 578216 first, though!
Comment 2 Tom Schuster [:evilpie] 2011-12-04 05:09:50 PST
Created attachment 578897 [details] [diff] [review]
v1

This takes about 1/3 of the time and should be safe to do.
Comment 3 Jason Orendorff [:jorendorff] 2011-12-06 08:44:11 PST
Comment on attachment 578897 [details] [diff] [review]
v1

Sure, ok.
Comment 4 Tom Schuster [:evilpie] 2011-12-13 11:24:52 PST
http://hg.mozilla.org/mozilla-central/rev/317182c27445

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