From cad810f21b803229eb11403f9209855525a25d57 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 6 May 2011 11:45:16 +0100 Subject: Merge WebKit at r75315: Initial merge by git. Change-Id: I570314b346ce101c935ed22a626b48c2af266b84 --- SunSpider/ChangeLog | 1083 -- SunSpider/SunSpider.make | 4 - SunSpider/TODO | 70 - SunSpider/UNCOVERED | 99 - SunSpider/hosted/json2.js | 481 - SunSpider/hosted/sunspider.css | 31 - SunSpider/hosted/sunspider.html | 81 - SunSpider/hosted/versions.html | 54 - SunSpider/make-hosted | 112 - SunSpider/resources/TEMPLATE.html | 58 - SunSpider/resources/driver-TEMPLATE.html | 115 - SunSpider/resources/results-TEMPLATE.html | 108 - SunSpider/resources/sunspider-analyze-results.js | 268 - SunSpider/resources/sunspider-compare-results.js | 380 - .../resources/sunspider-standalone-compare.js | 26 - SunSpider/resources/sunspider-standalone-driver.js | 60 - SunSpider/sunspider | 244 - SunSpider/sunspider-compare-results | 161 - SunSpider/tests/parse-only/LIST | 4 - .../parse-only/concat-jquery-mootools-prototype.js | 12699 ------------------- SunSpider/tests/parse-only/jquery-1.3.2.js | 4376 ------- .../tests/parse-only/mootools-1.2.2-core-nc.js | 4003 ------ SunSpider/tests/parse-only/prototype-1.6.0.3.js | 4320 ------- SunSpider/tests/sunspider-0.9.1/3d-cube.js | 337 - SunSpider/tests/sunspider-0.9.1/3d-morph.js | 54 - SunSpider/tests/sunspider-0.9.1/3d-raytrace.js | 441 - SunSpider/tests/sunspider-0.9.1/LIST | 26 - .../tests/sunspider-0.9.1/access-binary-trees.js | 50 - SunSpider/tests/sunspider-0.9.1/access-fannkuch.js | 66 - SunSpider/tests/sunspider-0.9.1/access-nbody.js | 169 - SunSpider/tests/sunspider-0.9.1/access-nsieve.js | 38 - .../sunspider-0.9.1/bitops-3bit-bits-in-byte.js | 32 - .../tests/sunspider-0.9.1/bitops-bits-in-byte.js | 21 - .../tests/sunspider-0.9.1/bitops-bitwise-and.js | 28 - .../tests/sunspider-0.9.1/bitops-nsieve-bits.js | 32 - .../tests/sunspider-0.9.1/controlflow-recursive.js | 25 - SunSpider/tests/sunspider-0.9.1/crypto-aes.js | 422 - SunSpider/tests/sunspider-0.9.1/crypto-md5.js | 286 - SunSpider/tests/sunspider-0.9.1/crypto-sha1.js | 224 - .../tests/sunspider-0.9.1/date-format-tofte.js | 299 - .../tests/sunspider-0.9.1/date-format-xparb.js | 417 - SunSpider/tests/sunspider-0.9.1/math-cordic.js | 95 - .../tests/sunspider-0.9.1/math-partial-sums.js | 33 - .../tests/sunspider-0.9.1/math-spectral-norm.js | 51 - SunSpider/tests/sunspider-0.9.1/regexp-dna.js | 1712 --- SunSpider/tests/sunspider-0.9.1/string-base64.js | 135 - SunSpider/tests/sunspider-0.9.1/string-fasta.js | 85 - SunSpider/tests/sunspider-0.9.1/string-tagcloud.js | 265 - .../tests/sunspider-0.9.1/string-unpack-code.js | 68 - .../tests/sunspider-0.9.1/string-validate-input.js | 89 - SunSpider/tests/sunspider-0.9/3d-cube.js | 337 - SunSpider/tests/sunspider-0.9/3d-morph.js | 54 - SunSpider/tests/sunspider-0.9/3d-raytrace.js | 441 - SunSpider/tests/sunspider-0.9/LIST | 26 - .../tests/sunspider-0.9/access-binary-trees.js | 50 - SunSpider/tests/sunspider-0.9/access-fannkuch.js | 66 - SunSpider/tests/sunspider-0.9/access-nbody.js | 169 - SunSpider/tests/sunspider-0.9/access-nsieve.js | 38 - .../sunspider-0.9/bitops-3bit-bits-in-byte.js | 32 - .../tests/sunspider-0.9/bitops-bits-in-byte.js | 21 - .../tests/sunspider-0.9/bitops-bitwise-and.js | 28 - .../tests/sunspider-0.9/bitops-nsieve-bits.js | 32 - .../tests/sunspider-0.9/controlflow-recursive.js | 25 - SunSpider/tests/sunspider-0.9/crypto-aes.js | 422 - SunSpider/tests/sunspider-0.9/crypto-md5.js | 286 - SunSpider/tests/sunspider-0.9/crypto-sha1.js | 224 - SunSpider/tests/sunspider-0.9/date-format-tofte.js | 299 - SunSpider/tests/sunspider-0.9/date-format-xparb.js | 417 - SunSpider/tests/sunspider-0.9/math-cordic.js | 95 - SunSpider/tests/sunspider-0.9/math-partial-sums.js | 33 - .../tests/sunspider-0.9/math-spectral-norm.js | 51 - SunSpider/tests/sunspider-0.9/regexp-dna.js | 1712 --- SunSpider/tests/sunspider-0.9/string-base64.js | 135 - SunSpider/tests/sunspider-0.9/string-fasta.js | 85 - SunSpider/tests/sunspider-0.9/string-tagcloud.js | 265 - .../tests/sunspider-0.9/string-unpack-code.js | 68 - .../tests/sunspider-0.9/string-validate-input.js | 89 - SunSpider/tests/ubench/LIST | 9 - SunSpider/tests/ubench/function-closure.js | 7 - SunSpider/tests/ubench/function-correct-args.js | 6 - SunSpider/tests/ubench/function-empty.js | 6 - SunSpider/tests/ubench/function-excess-args.js | 6 - SunSpider/tests/ubench/function-missing-args.js | 6 - SunSpider/tests/ubench/function-sum.js | 7 - SunSpider/tests/ubench/loop-empty-resolve.js | 2 - SunSpider/tests/ubench/loop-empty.js | 2 - SunSpider/tests/ubench/loop-sum.js | 5 - SunSpider/tests/v8-v4/LIST | 7 - SunSpider/tests/v8-v4/v8-crypto.js | 1695 --- SunSpider/tests/v8-v4/v8-deltablue.js | 877 -- SunSpider/tests/v8-v4/v8-earley-boyer.js | 4683 ------- SunSpider/tests/v8-v4/v8-raytrace.js | 933 -- SunSpider/tests/v8-v4/v8-regexp.js | 1613 --- SunSpider/tests/v8-v4/v8-richards.js | 537 - SunSpider/tests/v8-v4/v8-splay.js | 377 - SunSpider/tests/v8-v5/LIST | 7 - SunSpider/tests/v8-v5/v8-crypto.js | 1695 --- SunSpider/tests/v8-v5/v8-deltablue.js | 877 -- SunSpider/tests/v8-v5/v8-earley-boyer.js | 4683 ------- SunSpider/tests/v8-v5/v8-raytrace.js | 933 -- SunSpider/tests/v8-v5/v8-regexp.js | 1613 --- SunSpider/tests/v8-v5/v8-richards.js | 537 - SunSpider/tests/v8-v5/v8-splay.js | 377 - SunSpider/tests/v8-v6/LIST | 7 - SunSpider/tests/v8-v6/v8-crypto.js | 1695 --- SunSpider/tests/v8-v6/v8-deltablue.js | 877 -- SunSpider/tests/v8-v6/v8-earley-boyer.js | 4683 ------- SunSpider/tests/v8-v6/v8-raytrace.js | 902 -- SunSpider/tests/v8-v6/v8-regexp.js | 1613 --- SunSpider/tests/v8-v6/v8-richards.js | 537 - SunSpider/tests/v8-v6/v8-splay.js | 393 - SunSpider/xcopy.excludes | 3 - 112 files changed, 72047 deletions(-) delete mode 100644 SunSpider/ChangeLog delete mode 100644 SunSpider/SunSpider.make delete mode 100644 SunSpider/TODO delete mode 100644 SunSpider/UNCOVERED delete mode 100644 SunSpider/hosted/json2.js delete mode 100644 SunSpider/hosted/sunspider.css delete mode 100644 SunSpider/hosted/sunspider.html delete mode 100644 SunSpider/hosted/versions.html delete mode 100755 SunSpider/make-hosted delete mode 100644 SunSpider/resources/TEMPLATE.html delete mode 100644 SunSpider/resources/driver-TEMPLATE.html delete mode 100644 SunSpider/resources/results-TEMPLATE.html delete mode 100644 SunSpider/resources/sunspider-analyze-results.js delete mode 100644 SunSpider/resources/sunspider-compare-results.js delete mode 100644 SunSpider/resources/sunspider-standalone-compare.js delete mode 100644 SunSpider/resources/sunspider-standalone-driver.js delete mode 100755 SunSpider/sunspider delete mode 100755 SunSpider/sunspider-compare-results delete mode 100644 SunSpider/tests/parse-only/LIST delete mode 100644 SunSpider/tests/parse-only/concat-jquery-mootools-prototype.js delete mode 100644 SunSpider/tests/parse-only/jquery-1.3.2.js delete mode 100644 SunSpider/tests/parse-only/mootools-1.2.2-core-nc.js delete mode 100644 SunSpider/tests/parse-only/prototype-1.6.0.3.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/3d-cube.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/3d-morph.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/3d-raytrace.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/LIST delete mode 100644 SunSpider/tests/sunspider-0.9.1/access-binary-trees.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/access-fannkuch.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/access-nbody.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/access-nsieve.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/bitops-3bit-bits-in-byte.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/bitops-bits-in-byte.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/bitops-bitwise-and.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/bitops-nsieve-bits.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/controlflow-recursive.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/crypto-aes.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/crypto-md5.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/crypto-sha1.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/date-format-tofte.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/date-format-xparb.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/math-cordic.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/math-partial-sums.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/math-spectral-norm.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/regexp-dna.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/string-base64.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/string-fasta.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/string-tagcloud.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/string-unpack-code.js delete mode 100644 SunSpider/tests/sunspider-0.9.1/string-validate-input.js delete mode 100644 SunSpider/tests/sunspider-0.9/3d-cube.js delete mode 100644 SunSpider/tests/sunspider-0.9/3d-morph.js delete mode 100644 SunSpider/tests/sunspider-0.9/3d-raytrace.js delete mode 100644 SunSpider/tests/sunspider-0.9/LIST delete mode 100644 SunSpider/tests/sunspider-0.9/access-binary-trees.js delete mode 100644 SunSpider/tests/sunspider-0.9/access-fannkuch.js delete mode 100644 SunSpider/tests/sunspider-0.9/access-nbody.js delete mode 100644 SunSpider/tests/sunspider-0.9/access-nsieve.js delete mode 100644 SunSpider/tests/sunspider-0.9/bitops-3bit-bits-in-byte.js delete mode 100644 SunSpider/tests/sunspider-0.9/bitops-bits-in-byte.js delete mode 100644 SunSpider/tests/sunspider-0.9/bitops-bitwise-and.js delete mode 100644 SunSpider/tests/sunspider-0.9/bitops-nsieve-bits.js delete mode 100644 SunSpider/tests/sunspider-0.9/controlflow-recursive.js delete mode 100644 SunSpider/tests/sunspider-0.9/crypto-aes.js delete mode 100644 SunSpider/tests/sunspider-0.9/crypto-md5.js delete mode 100644 SunSpider/tests/sunspider-0.9/crypto-sha1.js delete mode 100644 SunSpider/tests/sunspider-0.9/date-format-tofte.js delete mode 100644 SunSpider/tests/sunspider-0.9/date-format-xparb.js delete mode 100644 SunSpider/tests/sunspider-0.9/math-cordic.js delete mode 100644 SunSpider/tests/sunspider-0.9/math-partial-sums.js delete mode 100644 SunSpider/tests/sunspider-0.9/math-spectral-norm.js delete mode 100644 SunSpider/tests/sunspider-0.9/regexp-dna.js delete mode 100644 SunSpider/tests/sunspider-0.9/string-base64.js delete mode 100644 SunSpider/tests/sunspider-0.9/string-fasta.js delete mode 100644 SunSpider/tests/sunspider-0.9/string-tagcloud.js delete mode 100644 SunSpider/tests/sunspider-0.9/string-unpack-code.js delete mode 100644 SunSpider/tests/sunspider-0.9/string-validate-input.js delete mode 100644 SunSpider/tests/ubench/LIST delete mode 100644 SunSpider/tests/ubench/function-closure.js delete mode 100644 SunSpider/tests/ubench/function-correct-args.js delete mode 100644 SunSpider/tests/ubench/function-empty.js delete mode 100644 SunSpider/tests/ubench/function-excess-args.js delete mode 100644 SunSpider/tests/ubench/function-missing-args.js delete mode 100644 SunSpider/tests/ubench/function-sum.js delete mode 100644 SunSpider/tests/ubench/loop-empty-resolve.js delete mode 100644 SunSpider/tests/ubench/loop-empty.js delete mode 100644 SunSpider/tests/ubench/loop-sum.js delete mode 100644 SunSpider/tests/v8-v4/LIST delete mode 100644 SunSpider/tests/v8-v4/v8-crypto.js delete mode 100644 SunSpider/tests/v8-v4/v8-deltablue.js delete mode 100644 SunSpider/tests/v8-v4/v8-earley-boyer.js delete mode 100644 SunSpider/tests/v8-v4/v8-raytrace.js delete mode 100644 SunSpider/tests/v8-v4/v8-regexp.js delete mode 100644 SunSpider/tests/v8-v4/v8-richards.js delete mode 100644 SunSpider/tests/v8-v4/v8-splay.js delete mode 100644 SunSpider/tests/v8-v5/LIST delete mode 100644 SunSpider/tests/v8-v5/v8-crypto.js delete mode 100644 SunSpider/tests/v8-v5/v8-deltablue.js delete mode 100644 SunSpider/tests/v8-v5/v8-earley-boyer.js delete mode 100644 SunSpider/tests/v8-v5/v8-raytrace.js delete mode 100644 SunSpider/tests/v8-v5/v8-regexp.js delete mode 100644 SunSpider/tests/v8-v5/v8-richards.js delete mode 100644 SunSpider/tests/v8-v5/v8-splay.js delete mode 100644 SunSpider/tests/v8-v6/LIST delete mode 100644 SunSpider/tests/v8-v6/v8-crypto.js delete mode 100644 SunSpider/tests/v8-v6/v8-deltablue.js delete mode 100644 SunSpider/tests/v8-v6/v8-earley-boyer.js delete mode 100644 SunSpider/tests/v8-v6/v8-raytrace.js delete mode 100644 SunSpider/tests/v8-v6/v8-regexp.js delete mode 100644 SunSpider/tests/v8-v6/v8-richards.js delete mode 100644 SunSpider/tests/v8-v6/v8-splay.js delete mode 100644 SunSpider/xcopy.excludes (limited to 'SunSpider') diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog deleted file mode 100644 index 8241848..0000000 --- a/SunSpider/ChangeLog +++ /dev/null @@ -1,1083 +0,0 @@ -2010-11-29 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Improved accuracy of command-line SunSpider. - - * resources/sunspider-standalone-driver.js: Use the returned number of - elapsed milliseconds from "run" and "checkSyntax" instead of measuring - ourselves, for slightly more accurate numbers. - -2010-09-16 Gavin Barraclough - - Reviewed by Mark Rowe. - https://bugs.webkit.org/show_bug.cgi?id=45924 - - Modify the SunSpider harness to allow a path to be passed to the --suite - argument, supress the normal prepend-"tests/" behaviour for suite names - containing a '/'. - - Also wrap the code in an anonymous function to move variables out of global - scope (currently the harness cannot handle running tests the overwrite the - variable 'j'). - - * resources/sunspider-standalone-driver.js: - * sunspider: - -2010-08-27 Michael Saboff - - Reviewed by Stephanie Lewis. - - Added version 5 and version 6 of V8 tests with modifications similar - to the version 4 tests so they'll work with the SunSpider test harness. - Note that these files are external source and therefore don't conform - to WebKit coding standards. - https://bugs.webkit.org/show_bug.cgi?id=44638 - - * tests/v8-v5: Added. - * tests/v8-v5/LIST: Added. - * tests/v8-v5/v8-crypto.js: Added. - * tests/v8-v5/v8-deltablue.js: Added. - * tests/v8-v5/v8-earley-boyer.js: Added. - * tests/v8-v5/v8-raytrace.js: Added. - * tests/v8-v5/v8-regexp.js: Added. - * tests/v8-v5/v8-richards.js: Added. - * tests/v8-v5/v8-splay.js: Added. - * tests/v8-v6: Added. - * tests/v8-v6/LIST: Added. - * tests/v8-v6/v8-crypto.js: Added. - * tests/v8-v6/v8-deltablue.js: Added. - * tests/v8-v6/v8-earley-boyer.js: Added. - * tests/v8-v6/v8-raytrace.js: Added. - * tests/v8-v6/v8-regexp.js: Added. - * tests/v8-v6/v8-richards.js: Added. - * tests/v8-v6/v8-splay.js: Added. - -2010-07-15 Stephanie Lewis - - Reviewed by Geoff Garen. - - http://bugs.webkit.org/show_bug.cgi?id=42406 - Output location of results file. - - * sunspider: - -2010-05-17 Maciej Stachowiak - - Reviewed by Mark Rowe. - - Browser-hosted version of SunSpider runs tests twice as many times as advertised - https://bugs.webkit.org/show_bug.cgi?id=39201 - - * make-hosted: Make sure to reset test list after every test suite. - -2010-05-07 Adam Roben - - Fix typo in sunspider-compare-results.js that caused incorrect - two-sample t statistics to be computed - - Fixes SunSpider computes incorrect - two-sample t statistics - - Reviewed by Darin Adler. - - * resources/sunspider-compare-results.js: - (sunspiderCompareResults.resultLine): Fixed the calculation of the t - variable to match the definition of a two-sample t statistic. Looks - like this was just a simple typo. - -2010-04-05 Darin Adler - - Updated the ignore property for changes to the contents here. - - * .: Modified property svn:ignore. - -2010-02-20 Maciej Stachowiak - - Reviewed by Adam Barth. - - Add sunspider-0.9.1 to the site in preparation for announcing it. - https://bugs.webkit.org/show_bug.cgi?id=35206 - - * hosted/sunspider.css: Remove tabs, which I noticed where present while - copying to the WebKitSite directory. - -2010-01-11 Oliver Hunt - - Reviewed by Darin Adler. - - Sunspider parse-only tests don't run - https://bugs.webkit.org/show_bug.cgi?id=33489 - - Fix parse-only test list - - * tests/parse-only/LIST: - -2009-12-15 Maciej Stachowiak - - Reviewed by Adele Peterson. - - Make SunSpider version more prominent in the title - https://bugs.webkit.org/show_bug.cgi?id=32574 - - * hosted/sunspider.html: - * hosted/versions.html: - * resources/driver-TEMPLATE.html: - * resources/results-TEMPLATE.html: - -2009-12-15 Maciej Stachowiak - - Reviewed by Darin Adler. - - Make SunSpider refuse to compare results across content versions - https://bugs.webkit.org/show_bug.cgi?id=32573 - - The results URL now includes a version indicator, and compare mode - will refuse to compare between versions. - - * resources/driver-TEMPLATE.html: - * resources/results-TEMPLATE.html: - -2009-12-14 Maciej Stachowiak - - Reviewed by Darin Adler. - - Some Browser-hosted SunSpider files are not valid HTML5 - https://bugs.webkit.org/show_bug.cgi?id=32536 - - Made various fixes to validate as HTML5 with no warnings (mainly removing bogus - close tags and adding a meta charset declaration). - - * hosted/sunspider.html: - * hosted/versions.html: - * resources/TEMPLATE.html: - * resources/driver-TEMPLATE.html: - * resources/results-TEMPLATE.html: - -2009-12-14 Maciej Stachowiak - - Reviewed by Eric Seidel. - - Make sunspider-0.9.1 the default content set (both command-line and hosted) - https://bugs.webkit.org/show_bug.cgi?id=32537 - - * hosted/sunspider.html: Change default suite link. - * sunspider: Change default suite. - * sunspider-compare-results: Likewise. - -2009-12-14 Maciej Stachowiak - - Reviewed by Sam Weinig. - - in-browser SunSpider suffers excessive penalty under power management - https://bugs.webkit.org/show_bug.cgi?id=32505 - - I have made a few changes to address this: - - 1) Change how browser-hosted SunSpider loads tests - preload the content and write it in with - document.write to reduce triggering of progress UI. - 2) Reduce time between tests to 10ms from 500ms, so that power management doesn't keep the CPU - stepped all the way down the whole time. - 3) Run the test cycle an extra time for warmup before the runs that count. - - * hosted/sunspider-record-result.js: Removed. - * make-hosted: - * resources/TEMPLATE.html: - * resources/driver-TEMPLATE.html: - -2009-12-13 Maciej Stachowiak - - Reviewed by Gavin Barraclough. - - SunSpider/tests/string-base64.js does not compute a valid base64 encoded string - https://bugs.webkit.org/show_bug.cgi?id=16806 - - Based on a patch by Eric Seidel. - - Fix the base64 computation to actually compute correct results. The impact on runtime of - the test is pretty small, but noticeable for some browsers. But at least it's not - doing a wrong and meaningless computation any more. - - * tests/sunspider-0.9.1/string-base64.js: - (): - (base64ToString): - -2009-12-13 Maciej Stachowiak - - Fixing commit error... - - I accidentally committed my last patch in a form that broke Web-hosted SunSpider. Fixing. - - * resources/driver-TEMPLATE.html: - -2009-12-13 Maciej Stachowiak - - Reviewed by Sam Weinig. - - Use JSON.parse instead of eval for Web-hosted SunSpider results processing - https://bugs.webkit.org/show_bug.cgi?id=32490 - - * hosted/json2.js: Added. Incorporated from json.org - * resources/driver-TEMPLATE.html: Fix an HTML validation bug I noticed. - * resources/results-TEMPLATE.html: Use JSON.parse instead of eval to process - results. - -2009-12-12 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - Enable Web-hosted version of SunSpider to handle multiple versions - https://bugs.webkit.org/show_bug.cgi?id=32478 - - * make-hosted: Now generate the hosted version to be able to run both the - 0.9 and the 0.9.1 test suites. - * hosted: Modified property svn:ignore. - * hosted/sunspider-driver.html: Removed. - * hosted/sunspider-results.html: Removed. - * hosted/sunspider.html: - * hosted/versions.html: Added. - * resources/TEMPLATE.html: - * resources/driver-TEMPLATE.html: Copied from hosted/sunspider-driver.html. - * resources/driver-TEMPLATE.html: Copied from hosted/sunspider-results.html. - -2009-12-12 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - Give command-line sunspider the ability to handle multiple suites and versions - https://bugs.webkit.org/show_bug.cgi?id=32477 - - Each suite/version's set of tests are now in a separate subdirectory of tests/, with a file named LIST - enumerating the tests. Current suites are: - - sunspider-0.9 - riginal SunSpider content - sunspider-0.9.1 - SunSpider suite with a few tests fixed (and a few more to come) - ubench - "ubench" microbenchmark suite - v8-v4 - version 4 of the v8 benchmark - parse-only - some parser tests - - Sunspider can now be run with the --suite= parameter to select a - suite. The default is --suite=sunspider-0.9. - - * .: Modified property svn:ignore to ignore new results directories. - * make-hosted: Generate based on sunspider-0.9 suite. - * resources/TEMPLATE.html: Fix an HTML compliance problem. - * resources/sunspider-standalone-driver.js: Become aware of suite names. - * sunspider: Modified to handle multiple suites as described above. - * sunspider-compare-results: ditto - * tests/LIST: Moved to tests/sunspider-0.9/ and tests/sunspider-0.9.1/ - * tests/LIST-PARSE-ONLY: Moved to parse-only/LIST - * tests/LIST-UBENCH: Removed. - * tests/LIST-V8: Removed. - * tests/3d-cube.js: Moved to tests/sunspider-0.9 and tests/sunspider-0.9.1 - * tests/3d-morph.js: ditto - * tests/3d-raytrace.js: ditto - * tests/access-binary-trees.js: ditto - * tests/access-fannkuch.js: ditto - * tests/access-nbody.js: ditto - * tests/access-nsieve.js: ditto - * tests/bitops-3bit-bits-in-byte.js: ditto - * tests/bitops-bits-in-byte.js: ditto - * tests/bitops-bitwise-and.js: ditto - * tests/bitops-nsieve-bits.js: ditto - * tests/controlflow-recursive.js: ditto - * tests/crypto-aes.js: ditto - * tests/crypto-md5.js: ditto - * tests/crypto-sha1.js: ditto - * tests/date-format-tofte.js: ditto - * tests/date-format-xparb.js: ditto - * tests/math-cordic.js: ditto - * tests/math-partial-sums.js: ditto - * tests/math-spectral-norm.js: ditto - * tests/regexp-dna.js: ditto - * tests/string-base64.js: ditto - * tests/string-fasta.js: ditto - * tests/string-tagcloud.js: ditto - * tests/string-unpack-code.js: ditto - * tests/string-validate-input.js: ditto - * tests/sunspider-0.9/: Added - * tests/sunspider-0.9/*.js: Moved from one level up - * tests/sunspider-0.9.1: Added. - * tests/sunspider-0.9.1/*.js: Moved from one level up. - * tests/v8-crypto.js: Moved to v8-v4/ directory. - * tests/v8-deltablue.js: ditto - * tests/v8-earley-boyer.js: ditto - * tests/v8-raytrace.js: ditto - * tests/v8-regexp.js: ditto - * tests/v8-richards.js: ditto - * tests/v8-splay.js: ditto - * tests/v8-v4: Added. - -2009-09-30 Csaba Osztrogonac - - Reviewed by Darin Adler. - - Platform specific null device replaced with a platform independent. - https://bugs.webkit.org/show_bug.cgi?id=29544 - - * sunspider: Using File::Spec->devnull() instead of /dev/null and NUL. - -2009-09-21 Csaba Osztrogonac - - Reviewed by Maciej Stachowiak. - - [Qt] Make sunspider script work on Windows platform. - https://bugs.webkit.org/show_bug.cgi?id=29544 - - * sunspider: - Using platform specific null device instead of /dev/null. - -2009-06-19 Adam Treat - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=26540 - Currently the SunSpider test driver lacks an option to run a test suite that - will test JavaScriptCore parsing performance only. This patch adds just such - a test suite and option to SunSpider as well as the jsc test shell. I've included - three large javascript source files found in the wild: jquery, mootools and prototype. - Combined with the concatenation of all three, these form a new testsuite to measure - and test pure JavaScriptCore parsing performance. - - * resources/sunspider-standalone-driver.js: - Load the js with parse-only flag if it is part of the parse-only suite. - * sunspider: - Add the parse-only suite to the list of options. - * sunspider-compare-results: - Add the parse-only suite to the list of options. - * tests/LIST-PARSE-ONLY: Added. - * tests/parse-only/concat-jquery-mootools-prototype.js: Added. - A very large concatenation of the scripts found below. This js takes ~30ms to parse on my machine. - * tests/parse-only/jquery-1.3.2.js: Added. - Latest version from jquery.com. - * tests/parse-only/mootools-1.2.2-core-nc.js: Added. - Latest version from mootools.net. - * tests/parse-only/prototype-1.6.0.3.js: Added. - Latest version from prototypejs.org. - -2009-06-13 Steve Falkenburg - - Update V8 benchmark to version 4. - - Reviewed by Cameron Zwarich. - - * tests/LIST-V8: - * tests/v8-crypto.js: - * tests/v8-deltablue.js: - * tests/v8-earley-boyer.js: - * tests/v8-raytrace.js: - * tests/v8-regexp.js: Added. - * tests/v8-richards.js: - * tests/v8-splay.js: Added. - -2009-05-26 Olivier DOLE - - Reviewed by Maciej. - - Store sunspider test suite results in a specific directory for each - different type of benchmark (sunspider, V8 or ubench). - - * sunspider: - * sunspider-compare-results: - -2009-05-12 Steve Falkenburg - - Build fix. - - * SunSpider.make: - -2009-05-11 Steve Falkenburg - - Include SunSpider tests in production builds. - - Reviewed by Adam Roben. - - * SunSpider.make: Added. - * xcopy.excludes: Added. - -2009-03-04 Oliver Hunt - - Added a few more tests to ubench - - RS=Gavin Barraclough - - Adding a couple of test to cover too few and too many arguments. This - is needed to prevent regressions in all call paths from my current refactoring. - - * tests/LIST-UBENCH: - * tests/ubench/function-correct-args.js: Added. - (f): - * tests/ubench/function-excess-args.js: Added. - (f): - -2008-10-30 Zoltan Horvath - - Fix a bug where when V8's or UBENCH's test suite list file is missing - the error message is suggesting that SunSpider's list file is missing. - - Reviewed by Sam Weinig. - - * sunspider: - (loadTestsList): Fix the error message to use the right list name. - -2008-10-07 David Hyatt - - https://bugs.webkit.org/show_bug.cgi?id=18989 - - Remove global substitution from SunSpider regexp test, since only Firefox was honoring it and - we want all browsers to be doing the same thing on the test. - - Reviewed by Maciej - - * tests/regexp-dna.js: - -2008-09-09 Cameron Zwarich - - Rubber-stamped by Maciej Stachowiak. - - The bleeding edge branch of V8 now supports passing fileanmes after - '-f', so the SunSpider script should be changed to do this again. - This allows all 3 major JavaScript engines to be used with the - unmodified SunSpider script. - - * sunspider: - -2008-09-04 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Add a '--args' option to SunSpider, so that we can pass '-j' to TraceMonkey - and '--expose-gc' to V8. Also, rename the '--v8' option to '--v8-suite' and - correct the punctuation in its documentation. - - * sunspider: - -2008-09-04 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20616: Incorporate V8 benchmarks in testing - - - This is a first attempt at running the V8 benchmarks within SunSpider, - with the --v8 option. The number of iterations is fixed for each - benchmark, and was chosen to make each of the benchmarks run between - 500 ms and 600 ms in V8 on my machine, a 2.16 GHz MacBook Pro. - - * sunspider: - * tests/LIST-V8: Added. - * tests/v8-crypto.js: Added. - * tests/v8-deltablue.js: Added. - * tests/v8-earley-boyer.js: Added. - * tests/v8-raytrace.js: Added. - * tests/v8-richards.js: Added. - -2008-09-02 Cameron Zwarich - - Not reviewed. - - Remove a local change that was accidentally committed in r36034. - - * resources/sunspider-standalone-driver.js: - -2008-09-02 Cameron Zwarich - - Rubber-stamped by Oliver Hunt. - - Make SunSpider work with JavaScript shells that don't take filenames - after a '-f' argument. - - * sunspider: - -2008-06-07 Cameron Zwarich - - Reviewed by Timothy. - - Remove the --squirrelfish option from SunSpider, as it is no longer needed. - - * sunspider: - * tests/LIST-SQUIRRELFISH: Removed. - -2008-06-03 Alexey Proskuryakov - - Rubber-stamped by Mark Rowe. - - Roll out r31215 - with Mac OS X 10.5.3, there is no need to pause update daemon any more. - - * sunspider: - -2008-04-15 Maciej Stachowiak - - Rubber stamped by Oliver. - - - add newly working tests to squirrelfish list - - * tests/LIST-SQUIRRELFISH: Add 3d-raytrace and string-unpack-code - -2008-04-14 Maciej Stachowiak - - Rubber stamped by Oliver. - - - move ubench tests properly. - - * tests/ubench: Added. - * tests/ubench/function-closure.js: Added. - * tests/ubench/function-empty.js: Added. - * tests/ubench/function-missing-args.js: Added. - * tests/ubench/function-sum.js: Added. - * tests/ubench/loop-empty-resolve.js: Added. - * tests/ubench/loop-empty.js: Added. - * tests/ubench/loop-sum.js: Added. - -2008-04-14 Maciej Stachowiak - - Rubber stamped by Oliver. - - * sunspider: Don't force --runs=1 in squirrelfish mode any more. - -2008-04-14 Maciej Stachowiak - - Reviewed by Oliver. - - - make --squirrelfish mode use the real harness, but a reduced set of tests - - Also add a new ubench mode which runs the older squirrelfish microbenchmarks. - - * sunspider: - * tests/LIST-SQUIRRELFISH: - * tests/LIST-UBENCH: Added. - * tests/squirrelfish: Moved to tests/ubench - -2008-04-14 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Removed an unused test. - - * tests/squirrelfish/loop-resolve.js: Removed. - -2008-04-10 Maciej Stachowiak - - Reviewed by Oliver. - - Add newly runnable tests to --squirrelfish mode. - - * tests/LIST-SQUIRRELFISH: - -2008-04-06 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - A little more love for --squirrelfish mode: - - Fixed a misplaced sort. Results properly sort now. - - Added a test list just for squirrelfish, and updated it to include - all currently passing SunSpider tests. - - Fixed the pruning regexp to match 3d-morph.js. - - * sunspider: - -2008-03-26 Geoffrey Garen - - Reviewed by Oliver Hunt. - - --squirrelfish mode: pared down tests for squirrelfish to chew on. - - * sunspider: - * tests/LIST: - * tests/squirrelfish: Added. - * tests/squirrelfish/function-closure.js: Added. - * tests/squirrelfish/function-empty.js: Added. - * tests/squirrelfish/function-missing-args.js: Added. - * tests/squirrelfish/function-sum.js: Added. - * tests/squirrelfish/loop-empty-resolve.js: Added. - * tests/squirrelfish/loop-empty.js: Added. - * tests/squirrelfish/loop-resolve.js: Added. - * tests/squirrelfish/loop-sum.js: Added. - -2008-03-21 Alexey Proskuryakov - - Reviewed by Geoff. - - * sunspider: Pause update daemon on Darwin to make results reliable - again (workaround for ). - -2008-02-07 Eric Seidel - - Reviewed by Sam. - - * sunspider: add an error message when ./tests/LIST is not found - -2007-12-29 Alp Toker - - Fix typo. - - * hosted/sunspider.html: - -2007-12-29 Alp Toker - - Reviewed by Maciej. - - Provide the current URL in the SunSpider results page. Useful for - copying benchmark results out of browsers without a location bar or - where the location bar can't handle long URLs. - - * hosted/sunspider-results.html: - -2007-12-20 Eric Seidel - - Reviewed by mjs. - - * sunspider: increase default number of runs for more accurate numbers - -2007-12-18 Mark Rowe - - Fix typo. - - * hosted/sunspider.html: - -2007-12-18 Maciej Stachowiak - - Reviewed by Eric. - - - give an extra digit of precision for small differences. - - * resources/sunspider-compare-results.js: - -2007-12-17 Maciej Stachowiak - - Reviewed by Eric. - - - work around IE layout bugs - - * hosted/sunspider.css: - -2007-12-17 Maciej Stachowiak - - Reviewed by Mark. - - - fix compare feature - - * hosted/sunspider-results.html: - -2007-12-17 Maciej Stachowiak - - Reviewed by Mark. - - - Change the format of the output URL to be shorter, to meet IE constraints - - * hosted/sunspider-driver.html: - * hosted/sunspider-results.html: - -2007-12-13 Maciej Stachowiak - - Reviewed by Oliver. - - - Add some explanatory test and a dumb logo to SunSpider web hosted version - - * hosted/sunspider-driver.html: - * hosted/sunspider-results.html: - * hosted/sunspider.css: - * hosted/sunspider.html: - -2007-12-13 Maciej Stachowiak - - Reviewed by Oliver. - - - Make the web-hosted version of SunSpider look a little bit less drab. - - * hosted/sunspider-driver.html: - * hosted/sunspider-results.html: - * hosted/sunspider.css: Added. - * hosted/sunspider.html: - * resources/TEMPLATE.html: - -2007-12-12 Maciej Stachowiak - - Reviewed by Sam. - - - Change sunspider-compare-results output from showing "% faster" values to "x as fast" values. - - A sample of what new-style results would look like: - - TEST COMPARISON FROM TO DETAILS - ... - ** TOTAL **: 1.41x as fast 6613.6ms +/- 0.1% 4703.0ms +/- 0.1% significant - ... - 3bit-bits-in-byte: *1.36x as slow* 88.8ms +/- 0.6% 121.1ms +/- 0.6% significant - - * resources/sunspider-compare-results.js: - -2007-11-14 Eric Seidel - - Reviewed by Sam. - - * sunspider: add --shark-cache for L2 Cache Miss profiling - -2007-11-09 Alexey Proskuryakov - - Reviewed by Darin Adler. - - http://bugs.webkit.org/show_bug.cgi?id=15925 - SunSpider should check for Shark being installed - - * sunspider: Explicitly test that shark command line tool is installed. - -2007-11-04 Darin Adler - - * hosted/sunspider.html: Tweaked formatting a bit. - -2007-11-03 Maciej Stachowiak - - Reviewed by Darin Adler. - - - Add compare mode and a description of the benchmark to the hosted version. - - * hosted/sunspider-results.html: Add compare mode - you can just paste in another results URL. - * hosted/sunspider.html: Added intro text. - * make-hosted: Copy new file. - * resources/sunspider-compare-results.js: Made more reusable by putting the implementation in - a function. - * resources/sunspider-standalone-compare.js: Added. Calls the function in the way standalone mode - expects. - * sunspider-compare-results: Use sunspider-standalone-compare.js. - -2007-11-02 Darin Adler - - * sunspider: Changed "--base" to "--set-baseline". - -2007-11-02 Darin Adler - - Reviewed by Maciej. - - * sunspider: Added a "--base" option that records the current test as a baseline. - Moved the code to find the newest .mshark file into a function (since I needed to use - it in the other script and I prefer to copy/paste a function). - - * sunspider-compare-results: Added logic to compare the baseline with the last - run when you don't pass any parameters. - -2007-10-29 Maciej Stachowiak - - Reviewed by Eric. - - - Added list of ECMAScript3 features that SunSpider does not cover currently. - - * UNCOVERED: Added. - -2007-10-29 Maciej Stachowiak - - Reviewed by Oliver. - - - Give better error messages when sunspider-compare-results fails - - * sunspider-compare-results: - -2007-10-29 Maciej Stachowiak - - Reviewed by Darin Adler. - - - fix Date tests to work in command-line SpiderMonkey - - * tests/date-format-tofte.js: - * tests/date-format-xparb.js: - -2007-10-29 Darin Adler - - Reviewed by Maciej. - - * sunspider: Added --shark20 option, to run Shark at its highest sample - resolution instead of its default. - -2007-10-28 Adam Roben - - Fix SunSpider on Windows - - Reviewed by Eric. - - * sunspider: Don't use colons in filenames. - -2007-10-28 Darin Adler - - Reviewed by Adam. - - * resources/sunspider-analyze-results.js: Tweak the output format a little. - Change so that when there's only one run we don't write out confidence - intervals at all rather than writing "NaN" over and over again. - - * sunspider: Use the time and date as a suffix on the results file, that way - all the results are left behind in the tmp directory. This will make it easy - for us to add features that compare past results in the future. Also rename - the .mshark files using the same scheme. - - * sunspider-compare-results: Relax the parsing rules so we can parse the - results file exactly as it's emitted from sunspider. - -2007-10-25 Adam Roben - - Strip carriage returns from results - - Carriage returns were screwing up sunspider-compare-results on - Windows. - - Rubberstamped by Oliver. - - * sunspider: - -2007-10-24 Darin Adler - - Reviewed by Eric. - - * sunspider: Open the profile in shark after completing a run. - * sunspider-compare-results: Tiny perl tweaks. - -2007-10-23 Maciej Stachowiak - - Reviewed by Darin Adler. - - - Don't hardcode my path to testkjs - - * sunspider-compare-results: - -2007-10-23 Maciej Stachowiak - - Reviewed by Darin Adler. - - - Add a compare script to compare results, and improve formatting of standard results a bit. - - * resources/sunspider-analyze-results.js: - * resources/sunspider-compare-results.js: Added. - * sunspider-compare-results: Added. - -2007-10-23 Maciej Stachowiak - - Reviewed by Darin Adler. - - * resources/sunspider-analyze-results.js: Do the error range - properly, using the t-distribution instead of 1.96 (which was - based on the normal distribution). - - * sunspider: Print results in a way that will be friendlier to the - soon-to-come compare mode. - -2007-10-22 Maciej Stachowiak - - Reviewed by Review. - - - add more tests (probably the final set for now) - - Already balanced. Added date, regexp, control flow, and a few - more string and object/array access tests. - - * tests/LIST: - * tests/access-fannkuch.js: Added. - * tests/access-nbody.js: Added. - * tests/controlflow-recursive.js: Added. - * tests/date-format-tofte.js: Added. - * tests/date-format-xparb.js: Added. - * tests/regexp-dna.js: Added. - * tests/string-validate-input.js: Added. - -2007-10-21 Eric Seidel - - Reviewed by mjs. - - * sunspider: make --shark only sample from testkjs - -2007-10-21 Maciej Stachowiak - - Rubber stamped by Eric. - - - added crypto tests (already balanced) - - * tests/LIST: - * tests/crypto-aes.js: Added. - * tests/crypto-md5.js: Added. - * tests/crypto-sha1.js: Added. - -2007-10-21 Maciej Stachowiak - - Reviewed by Adam. - - - rebalance new tests - - Scaled the new tests so they take 400-600ms on a reasonably normal user setup: - - Internet Explorer 7, Window XP, Dell Latitude D810 with a 2.13GHz Pentium M - - This balances them with the existing tests. - - * tests/access-binary-trees.js: - * tests/access-nsieve.js: - * tests/bitops-nsieve-bits.js: - * tests/math-partial-sums.js: - * tests/math-spectral-norm.js: - * tests/string-fasta.js: - -2007-10-20 Eric Seidel - - Reviewed by darin. - - Add improved argument handling to sunspider, including - --runs=, --tests= - - Reviewed by Mark. - - - Add more new tests, mostly from the computer language shootout. Not normalized yet. - - * TODO: - * tests/LIST: - * tests/access-binary-trees.js: Added. - * tests/access-nsieve.js: Added. - * tests/bitops-nsieve-bits.js: Added. - * tests/math-partial-sums.js: Added. - * tests/math-spectral-norm.js: Added. - * tests/string-fasta.js: Added. - -2007-10-20 Maciej Stachowiak - - Reviewed by Darin Adler. - - * TODO: Updated to note areas that are now well-covered. - - - Change the tests and the driver to avoid leaving large object - graphs hanging around, since that throws off the subsequent tests. - - * resources/sunspider-standalone-driver.js: - * tests/3d-cube.js: - * tests/3d-morph.js: - * tests/3d-raytrace.js: - * tests/bitops-bitwise-and.js: - * tests/string-base64.js: - * tests/string-tagcloud.js: - -2007-10-20 Maciej Stachowiak - - Reviewed by Nikolas. - - - Rebalance test complexity. - - Scaled all the tests so they take 400-600ms on a reasonably normal user setup: - - Internet Explorer 7, Window XP, Dell Latitude D810 with a 2.13GHz Pentium M - - However, for some tests, IE7 was a huge outlier compared to other - major browsers. For those tests, I used Firefox 2.0.0.8 on the - same OS and hardware as a normalization basis. - - * tests/3d-morph.js: - * tests/3d-raytrace.js: - * tests/bitops-3bit-bits-in-byte.js: - * tests/bitops-bits-in-byte.js: - * tests/bitops-bitwise-and.js: - * tests/math-cordic.js: - * tests/string-base64.js: - * tests/string-tagcloud.js: - * tests/string-unpack-code.js: - -2007-10-20 Maciej Stachowiak - - Reviewed by Oliver. - - - Fix the browser-hosted driver to be compatible with Safari 2 - - * hosted/sunspider-driver.html: - -2007-10-20 Maciej Stachowiak - - Rubber stamped by Hyatt. - - - Add BSD license notice to cordic test, the original author said to do so. - - * tests/math-cordic.js: - -2007-10-18 Maciej Stachowiak - - Reviewed by Eric. - - - Support Windows and Windows browsers. - - * hosted/sunspider-results.html: Display results correctly in IE. - * sunspider: tweaks to work on Windows, and with spaces in the path. - -2007-10-18 Maciej Stachowiak - - Rubber stamped by Oliver. - - * tests/string-tagcloud.js: Remove stray print() - -2007-10-17 Maciej Stachowiak - - Reviewed by Oliver. - - Add some string test cases. - - * tests/string-base64.js: Added. Does base64 encoding and decoding. - * tests/string-tagcloud.js: Added. Parses a JSON string and - generates tagcloud HTML markup based on the data. - * tests/string-unpack-code.js: Added. Unpack compressed versions of - four of the most popular JavaScript libraries. - * tests/LIST: Added the new tests. - -2007-10-16 Maciej Stachowiak - - Reviewed by Anders. - - * TODO: Updated with info on how to do the stats properly. - - * hosted/sunspider-driver.html: Reduce timeout from 500 to 200 to - avoid overly slowing down the benchmark. - - Added some 3D-related test cases. - - * tests/3d-cube.js: Added. - * tests/3d-morph.js: Added. - * tests/3d-raytrace.js: Added. - * tests/LIST: - -2007-10-14 Maciej Stachowiak - - Reviewed by Darin Adler. - - - New JavaScript benchmark - http://bugs.webkit.org/show_bug.cgi?id=15515 - - A start on a new JavaScript benchmark, with standalone and - browser-hosted drivers. - - The test content is still incomplete and the drivers could use - some more features but there is enough here to make a good start. - - The drivers compute a 95% confidence interval on the mean for the - whole test, each category, and each individual test to make it - easier to tell whether differences are statistically - significant. The confidence interval can be narrowed by running - the test more times. - - * TODO: Added. Remaining things that need to be done. - * sunspider: Added. Perl script that acts as the standalone test driver. - * resources/sunspider-standalone-driver.js: Added. JavaScript part - of standalone test driver. - * resources/sunspider-analyze-results.js: Added. JavaScript statistical - analysis code. - * resources/TEMPLATE.html: Added. Template for browser-hosted tests. - * make-hosted: Added. Script to generate browser-hosted tests. - * hosted/sunspider.html: Added. Start page for browser-hosted test. - * hosted/sunspider-driver.html: Added. Driver for browser-hosted tests. - * hosted/sunspider-results.html: Added. Results page for browser-hosted - tests. - * hosted/sunspider-record-result.js: Added. Helper file for browser-hosted - tests. - * tests/LIST: Added. List of tests to use. - * tests/bitops-3bit-bits-in-byte.js: Added. Some initial test content. - * tests/bitops-bits-in-byte.js: Added. Ditto. - * tests/bitops-bitwise-and.js: Added. Ditto. - * tests/math-cordic.js: Added. Ditto. - diff --git a/SunSpider/SunSpider.make b/SunSpider/SunSpider.make deleted file mode 100644 index 46b1468..0000000 --- a/SunSpider/SunSpider.make +++ /dev/null @@ -1,4 +0,0 @@ -install: - xcopy /exclude:$(SRCROOT)\xcopy.excludes "$(SRCROOT)\tests" "$(DSTROOT)\AppleInternal\tests\SunSpider\tests" /e/v/i/h/y - xcopy /exclude:$(SRCROOT)\xcopy.excludes "$(SRCROOT)\resources" "$(DSTROOT)\AppleInternal\tests\SunSpider\resources" /e/v/i/h/y - xcopy /exclude:$(SRCROOT)\xcopy.excludes "$(SRCROOT)\sunspider" "$(DSTROOT)\AppleInternal\tests\SunSpider" /v/i/h/y diff --git a/SunSpider/TODO b/SunSpider/TODO deleted file mode 100644 index fee4bc0..0000000 --- a/SunSpider/TODO +++ /dev/null @@ -1,70 +0,0 @@ - -* Add more test cases. Categories we'd like to cover (with reasonably - real-world tests, preferably not microbenchmarks) include: - - (X marks the ones that are fairly well covered now). - - X math (general) - X bitops - X 3-d (the math bits) - - crypto / encoding - X string processing - - regexps - - date processing - - array processing - - control flow - - function calls / recursion - - object access (unclear if it is possible to make a realistic - benchmark that isolates this) - - I'd specifically like to add all the computer language shootout - tests that Mozilla is using. - -* Normalize tests. Most of the test cases available have a repeat - count of some sort, so the time they take can be tuned. The tests - should be tuned so that each category contributes about the same - total, and so each test in each category contributes about the same - amount. The question is, what implementation should be the baseline? - My current thought is to either pick some specific browser on a - specific platform (IE 7 or Firefox 2 perhaps), or try to target the - average that some set of same-generation release browsers get on - each test. The latter is more work. IE7 is probably a reasonable - normalization target since it is the latest version of the most - popular browser, so results on this benchmark will tell you how much - you have to gain or lose by using a different browser. - -* Instead of using the standard error, the correct way to calculate - a 95% confidence interval for a small sample is the t-test. - . Basically this involves - using values from a 2-tailed t-distribution table instead of 1.96 to - multiply by the error function, a table is available at - - -* Add support to compare two different engines (or two builds of the - same engine) interleaved. - -* Add support to compare two existing sets of saved results. - -* Allow repeat count to be controlled from the browser-hosted version - and the WebKitTools wrapper script. - -* Add support to run only a subset of the tests (both command-line and - web versions). - -* Add a profile mode for the command-line version that runs the tests - repeatedly in the same command-line interpreter instance, for ease - of profiling. - -* Make the browser-hosted version prettier, both in general design and - maybe using bar graphs for the output. - -* Make it possible to track change over time and generate a graph per - result showing result and error bar for each version. - -* Hook up to automated testing / buildbot infrastructure. - -* Possibly... add the ability to download iBench from its original - server, pull out the JS test content, preprocess it, and add it as a - category to the benchmark. - -* Profit. diff --git a/SunSpider/UNCOVERED b/SunSpider/UNCOVERED deleted file mode 100644 index 2a34572..0000000 --- a/SunSpider/UNCOVERED +++ /dev/null @@ -1,99 +0,0 @@ - -The following language features are not covered: - -Operators: - ->>>= -^= -%= -in -prefix -- ->>= -delete -void -instanceof - - -statements: - -with -switch - - -core language feaures: - -getters / setters -closure data access -heavy use of first-class functions - -Builtins: - -String.search - -Number.toFixed -Number.toExponential -Number.toPrecision - -RegExp.exec -RegExp custom properties - -Function.apply -Function.call - -parseInt -parseFloat -escape -unescape -decodeURI -encodeURI - - -Date.toDateString -Date.toTimeString -Date.getUTCFullYear -Date.getUTCMonth -Date.getUTCDate -Date.getUTCDay -Date.getUTCSeconds -Date.getMilliseconds -Date.getUTCMilliseconds -Date.set* - - -Math.E -Math.LN2 -Math.LN10 -Math.LOG2E -Math.LOG10E -Math.SQRT1_2 -Math.SQRT2 -Math.acos -Math.asin -Math.atan -Math.atan2 -Math.exp -Math.min -Math.tan - -Object.hasOwnProperty -Object.propertyIsEnumerable -Object.isPrototypeOf - - -Array.concat -Array.join -Array.pop -Array.push -Array.reverse -Array.shift -Array.slice -Array.sort -Array.splice -Array.unshift -Array.every -Array.forEach -Array.some -Array.indexOf -Array.lastIndexOf -Array.filter -Array.map diff --git a/SunSpider/hosted/json2.js b/SunSpider/hosted/json2.js deleted file mode 100644 index 39d8f37..0000000 --- a/SunSpider/hosted/json2.js +++ /dev/null @@ -1,481 +0,0 @@ -/* - http://www.JSON.org/json2.js - 2009-09-29 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - See http://www.JSON.org/js.html - - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. - - - This file creates a global JSON object containing two methods: stringify - and parse. - - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. - - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. - - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. - - This method produces a JSON text from a JavaScript value. - - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value - - For example, this would serialize Dates as ISO strings. - - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; - - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. - - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. - - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. - - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. - - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. - - Example: - - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' - - - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' - - - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. - - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. - - Example: - - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. - - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); - - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); - - - This is a reference implementation. You are free to copy, modify, or - redistribute. -*/ - -/*jslint evil: true, strict: false */ - -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ - - -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. - -if (!this.JSON) { - this.JSON = {}; -} - -(function () { - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - if (typeof Date.prototype.toJSON !== 'function') { - - Date.prototype.toJSON = function (key) { - - return isFinite(this.valueOf()) ? - this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z' : null; - }; - - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - - function quote(string) { - -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - -// Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - -// If the value has a toJSON method, call it to obtain a replacement value. - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - -// What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - -// JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - - return String(value); - -// If the type is 'object', we might be dealing with an object or an array or -// null. - - case 'object': - -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. - - if (!value) { - return 'null'; - } - -// Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - -// Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - -// Join all of the elements together, separated with commas, and wrap them in -// brackets. - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - -// If the replacer is an array, use it to select the members to be stringified. - - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - -// Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - -// Join all of the member texts together, separated with commas, -// and wrap them in braces. - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - -// If the JSON object does not yet have a stringify method, give it one. - - if (typeof JSON.stringify !== 'function') { - JSON.stringify = function (value, replacer, space) { - -// The stringify method takes a value and an optional replacer, and an optional -// space parameter, and returns a JSON text. The replacer can be a function -// that can replace values, or an array of strings that will select the keys. -// A default replacer method can be provided. Use of the space parameter can -// produce text that is more easily readable. - - var i; - gap = ''; - indent = ''; - -// If the space parameter is a number, make an indent string containing that -// many spaces. - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - -// If the space parameter is a string, it will be used as the indent string. - - } else if (typeof space === 'string') { - indent = space; - } - -// If there is a replacer, it must be a function or an array. -// Otherwise, throw an error. - - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - -// Make a fake root object containing our value under the key of ''. -// Return the result of stringifying the value. - - return str('', {'': value}); - }; - } - - -// If the JSON object does not yet have a parse method, give it one. - - if (typeof JSON.parse !== 'function') { - JSON.parse = function (text, reviver) { - -// The parse method takes a text and an optional reviver function, and returns -// a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - -// The walk method is used to recursively walk the resulting structure so -// that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - -// Parsing happens in four stages. In the first stage, we replace certain -// Unicode characters with escape sequences. JavaScript handles many characters -// incorrectly, either silently deleting them, or treating them as line endings. - - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - -// In the second stage, we run the text against regular expressions that look -// for non-JSON patterns. We are especially concerned with '()' and 'new' -// because they can cause invocation, and '=' because it can cause mutation. -// But just to be safe, we want to reject all unexpected forms. - -// We split the second stage into 4 regexp operations in order to work around -// crippling inefficiencies in IE's and Safari's regexp engines. First we -// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we -// replace all simple value tokens with ']' characters. Third, we delete all -// open brackets that follow a colon or comma or that begin the text. Finally, -// we look to see that the remaining characters are only whitespace or ']' or -// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/. -test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). -replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). -replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - -// In the third stage we use the eval function to compile the text into a -// JavaScript structure. The '{' operator is subject to a syntactic ambiguity -// in JavaScript: it can begin a block or an object literal. We wrap the text -// in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - -// In the optional fourth stage, we recursively walk the new structure, passing -// each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' ? - walk({'': j}, '') : j; - } - -// If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - } -}()); diff --git a/SunSpider/hosted/sunspider.css b/SunSpider/hosted/sunspider.css deleted file mode 100644 index c91a103..0000000 --- a/SunSpider/hosted/sunspider.css +++ /dev/null @@ -1,31 +0,0 @@ - -body { font-family: sans-serif; - margin: 20px; - background-color: #D9D5A1; - color: #1B0636 } - -h2 { background-color: #4E8AB9; - margin: -20px -20px 0px -20px; - padding: 30px 20px 30px 20px; - color: yellow; - border-bottom: 2px solid #360D6B; - zoom: 1.0 /* I CAN HAS LAYOUT? (ie hack) */ } - -dt { font-weight: bold } - -dd { margin-bottom: 1em; margin-top: 0.5em } - -:link { color: #1363A1 } -:visited { color: #5113A1 } - -#testframe { margin-top: 20px; - width: 80%; - height: 500px; - border: 2px solid #360D6B } - -#logo { float: left; - position: relative; - bottom: 0.33em; - padding-right: 20px; - margin-bottom: -40px; - font-size: 3em } diff --git a/SunSpider/hosted/sunspider.html b/SunSpider/hosted/sunspider.html deleted file mode 100644 index ac65970..0000000 --- a/SunSpider/hosted/sunspider.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -SunSpider 0.9.1 JavaScript Benchmark - - - - - -

SunSpider 0.9.1 JavaScript Benchmark

- -

This is SunSpider, a JavaScript benchmark. This benchmark tests the -core JavaScript language only, not the DOM or other browser APIs. It -is designed to compare different versions of the same browser, and -different browsers to each other. Unlike many widely available -JavaScript benchmarks, this test is:

- -
-
Real World
-
This test mostly avoids microbenchmarks, and tries to focus on -the kinds of actual problems developers solve with JavaScript today, -and the problems they may want to tackle in the future as the language -gets faster. This includes tests to generate a tagcloud from JSON -input, a 3D raytracer, cryptography tests, code decompression, and -many more examples. There are a few microbenchmarkish things, but they -mostly represent real performance problems that developers have -encountered.
- -
Balanced
-
This test is balanced between different areas of the language and -different types of code. It's not all math, all string processing, or -all timing simple loops. In addition to having tests in many -categories, the individual tests were balanced to take similar amounts -of time on currently shipping versions of popular browsers.
- -
Statistically Sound
-
One of the challenges of benchmarking is knowing how much noise -you have in your measurements. This benchmark runs each test multiple -times and determines an error range (technically, a 95% confidence -interval). In addition, in comparison mode it tells you if you have -enough data to determine if the difference is statistically -significant.
- -
- -

Current version - sunspider-0.9.1: Start Now!
-(When you run the benchmark, be patient - it loops through all of the -test cases five times and can take a minute or longer to complete.)

- -All versions. - - - - diff --git a/SunSpider/hosted/versions.html b/SunSpider/hosted/versions.html deleted file mode 100644 index 47741ce..0000000 --- a/SunSpider/hosted/versions.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - -SunSpider 0.9.1 JavaScript Benchmark - - - - - -

SunSpider 0.9.1 JavaScript Benchmark

- -

This is SunSpider, a JavaScript benchmark. This benchmark tests the -core JavaScript language only, not the DOM or other browser APIs. It -is designed to compare different versions of the same browser, and -different browsers to each other.

- -

This version of the harness is 0.9.1. This page lists all versions -of the test content:

- - - - - diff --git a/SunSpider/make-hosted b/SunSpider/make-hosted deleted file mode 100755 index 65b30c1..0000000 --- a/SunSpider/make-hosted +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/perl -w - -# Copyright (C) 2007 Apple Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -use strict; - -open TEMPLATE, " }; -close TEMPLATE; - -open DRIVER_TEMPLATE, " }; -close DRIVER_TEMPLATE; - -open RESULTS_TEMPLATE, " }; -close RESULTS_TEMPLATE; - -my @suites = ("sunspider-0.9", "sunspider-0.9.1"); - -foreach my $suite (@suites) { - - my @tests = (); - my @categories = (); - my %uniqueCategories = (); - - mkdir "hosted/${suite}"; - - open TESTLIST, "<./tests/${suite}/LIST"; - while () { - chomp; - next unless $_; - push @tests, $_; - my $category = $_; - $category =~ s/-.*//; - if (!$uniqueCategories{$category}) { - push @categories, $category; - $uniqueCategories{$category} = $category; - } - } - close TESTLIST; - - my @testContents = (); - for my $test (@tests) { - my $name = "${test}"; - - open SCRIPT, " }; - close SCRIPT; - - my $output = $template; - $output =~ s/\@NAME\@/${name}/g; - $output =~ s/\@SCRIPT\@/${script}/g; - $output =~ s/\\/\\\\/g; - $output =~ s/"/\\"/g; - $output =~ s/\n/\\n\\\n/g; - $output = $output; - push @testContents, $output; - } - - my $output = $driverTemplate; - $output =~ s/\@SUITE\@/${suite}/g; - - open OUTPUT, ">hosted/${suite}/driver.html"; - print OUTPUT $output; - close OUTPUT; - - $output = $resultsTemplate; - $output =~ s/\@SUITE\@/${suite}/g; - - open OUTPUT, ">hosted/${suite}/results.html"; - print OUTPUT $output; - close OUTPUT; - - my $prefix = "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n"; - $prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n"; - - open PREFIX, ">hosted/${suite}/sunspider-test-prefix.js"; - print PREFIX $prefix; - close PREFIX; - - my $contents = "var testContents = [ " . join(", ", map { '"' . $_ . '"' } @testContents) . " ];\n"; - - open CONTENTS, ">hosted/${suite}/sunspider-test-contents.js"; - print CONTENTS $contents; - close CONTENTS; -} - -system("cp resources/sunspider-analyze-results.js hosted"); -system("cp resources/sunspider-compare-results.js hosted"); -print "hosted/sunspider.html is ready to use.\n"; diff --git a/SunSpider/resources/TEMPLATE.html b/SunSpider/resources/TEMPLATE.html deleted file mode 100644 index 3dc3f2f..0000000 --- a/SunSpider/resources/TEMPLATE.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - -SunSpider @NAME@ - - - - -

@NAME@

-
-
- - - - - diff --git a/SunSpider/resources/driver-TEMPLATE.html b/SunSpider/resources/driver-TEMPLATE.html deleted file mode 100644 index 12d0952..0000000 --- a/SunSpider/resources/driver-TEMPLATE.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - -SunSpider 0.9.1 JavaScript Benchmark (@SUITE@ test suite - In Progress...) - - - - - -

SunSpider JavaScript Benchmark (In Progress...)

-

Content Version: @SUITE@

- - - - - -
-
- - - diff --git a/SunSpider/resources/results-TEMPLATE.html b/SunSpider/resources/results-TEMPLATE.html deleted file mode 100644 index d5007fd..0000000 --- a/SunSpider/resources/results-TEMPLATE.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - -SunSpider 0.9.1 JavaScript Benchmark Results (@SUITE@ test suite) - - - - -

SunSpider 0.9.1 JavaScript Benchmark Results

- -

Content Version: @SUITE@

- -

Run Again

- -


-(You can bookmark this results URL for later comparison.)

- -
To compare to another run, paste a saved result URL in the text field below and press enter:
-
-
- -
-
- - - - - - - - - - - - - diff --git a/SunSpider/resources/sunspider-analyze-results.js b/SunSpider/resources/sunspider-analyze-results.js deleted file mode 100644 index d849f59..0000000 --- a/SunSpider/resources/sunspider-analyze-results.js +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var count = output.length; - -var itemTotals = {}; -itemTotals.length = count; - -var total = 0; -var categoryTotals = {}; -var testTotalsByCategory = {}; - -var mean = 0; -var categoryMeans = {}; -var testMeansByCategory = {}; - -var stdDev = 0; -var categoryStdDevs = {}; -var testStdDevsByCategory = {}; - -var stdErr = 0; -var categoryStdErrs = {}; -var testStdErrsByCategory = {}; - -function initialize() -{ - itemTotals = {total: []}; - - for (var i = 0; i < categories.length; i++) { - var category = categories[i]; - itemTotals[category] = []; - categoryTotals[category] = 0; - testTotalsByCategory[category] = {}; - categoryMeans[category] = 0; - testMeansByCategory[category] = {}; - categoryStdDevs[category] = 0; - testStdDevsByCategory[category] = {}; - categoryStdErrs[category] = 0; - testStdErrsByCategory[category] = {}; - } - - for (var i = 0; i < tests.length; i++) { - var test = tests[i]; - itemTotals[test] = []; - var category = test.replace(/-.*/, ""); - testTotalsByCategory[category][test] = 0; - testMeansByCategory[category][test] = 0; - testStdDevsByCategory[category][test] = 0; - testStdErrsByCategory[category][test] = 0; - } - - for (var i = 0; i < count; i++) { - itemTotals["total"][i] = 0; - for (var category in categoryTotals) { - itemTotals[category][i] = 0; - for (var test in testTotalsByCategory[category]) { - itemTotals[test][i] = 0; - } - } - } -} - -function computeItemTotals() -{ - for (var i = 0; i < output.length; i++) { - var result = output[i]; - for (var test in result) { - var time = result[test]; - var category = test.replace(/-.*/, ""); - itemTotals["total"][i] += time; - itemTotals[category][i] += time; - itemTotals[test][i] += time; - } - } -} - -function computeTotals() -{ - for (var i = 0; i < output.length; i++) { - var result = output[i]; - for (var test in result) { - var time = result[test]; - var category = test.replace(/-.*/, ""); - total += time; - categoryTotals[category] += time; - testTotalsByCategory[category][test] += time; - } - } -} - -function computeMeans() -{ - mean = total / count; - for (var category in categoryTotals) { - categoryMeans[category] = categoryTotals[category] / count; - for (var test in testTotalsByCategory[category]) { - testMeansByCategory[category][test] = testTotalsByCategory[category][test] / count; - } - } -} - -function standardDeviation(mean, items) -{ - var deltaSquaredSum = 0; - for (var i = 0; i < items.length; i++) { - var delta = items[i] - mean; - deltaSquaredSum += delta * delta; - } - variance = deltaSquaredSum / (items.length - 1); - return Math.sqrt(variance); -} - -function computeStdDevs() -{ - stdDev = standardDeviation(mean, itemTotals["total"]); - for (var category in categoryStdDevs) { - categoryStdDevs[category] = standardDeviation(categoryMeans[category], itemTotals[category]); - } - for (var category in categoryStdDevs) { - for (var test in testStdDevsByCategory[category]) { - testStdDevsByCategory[category][test] = standardDeviation(testMeansByCategory[category][test], itemTotals[test]); - } - } -} - -function computeStdErrors() -{ - var sqrtCount = Math.sqrt(count); - - stdErr = stdDev / sqrtCount; - for (var category in categoryStdErrs) { - categoryStdErrs[category] = categoryStdDevs[category] / sqrtCount; - } - for (var category in categoryStdDevs) { - for (var test in testStdErrsByCategory[category]) { - testStdErrsByCategory[category][test] = testStdDevsByCategory[category][test] / sqrtCount; - } - } - -} - -var tDistribution = [NaN, NaN, 12.71, 4.30, 3.18, 2.78, 2.57, 2.45, 2.36, 2.31, 2.26, 2.23, 2.20, 2.18, 2.16, 2.14, 2.13, 2.12, 2.11, 2.10, 2.09, 2.09, 2.08, 2.07, 2.07, 2.06, 2.06, 2.06, 2.05, 2.05, 2.05, 2.04, 2.04, 2.04, 2.03, 2.03, 2.03, 2.03, 2.03, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.96]; -var tMax = tDistribution.length; -var tLimit = 1.96; - -function tDist(n) -{ - if (n > tMax) - return tLimit; - return tDistribution[n]; -} - - -function formatResult(meanWidth, mean, stdErr, n) -{ - var meanString = mean.toFixed(1).toString(); - while (meanString.length < meanWidth) { - meanString = " " + meanString; - } - - if (n == 1) - return meanString + "ms"; - - return meanString + "ms +/- " + ((tDist(n) * stdErr / mean) * 100).toFixed(1) + "%"; -} - -function computeLabelWidth() -{ - var width = "Total".length; - for (var category in categoryMeans) { - if (category.length + 2 > width) - width = category.length + 2; - } - for (var i = 0; i < tests.length; i++) { - var shortName = tests[i].replace(/^[^-]*-/, ""); - if (shortName.length + 4 > width) - width = shortName.length + 4; - } - - return width; -} - -function computeMeanWidth() -{ - var width = mean.toFixed(1).toString().length; - for (var category in categoryMeans) { - var candidate = categoryMeans[category].toFixed(2).toString().length; - if (candidate > width) - width = candidate; - for (var test in testMeansByCategory[category]) { - var candidate = testMeansByCategory[category][test].toFixed(2).toString().length; - if (candidate > width) - width = candidate; - } - } - - return width; -} - -function resultLine(labelWidth, indent, label, meanWidth, mean, stdErr) -{ - var result = ""; - for (i = 0; i < indent; i++) { - result += " "; - } - - result += label + ": "; - - for (i = 0; i < (labelWidth - (label.length + indent)); i++) { - result += " "; - } - - return result + formatResult(meanWidth, mean, stdErr, count); -} - -function printOutput() -{ - var labelWidth = computeLabelWidth(); - var meanWidth = computeMeanWidth(); - - print("\n"); - print("============================================"); - if (count == 1) - print("RESULTS"); - else - print("RESULTS (means and 95% confidence intervals)"); - print("--------------------------------------------"); - print(resultLine(labelWidth, 0, "Total", meanWidth, mean, stdErr)); - print("--------------------------------------------"); - for (var category in categoryMeans) { - print(""); - print(resultLine(labelWidth, 2, category, meanWidth, categoryMeans[category], categoryStdErrs[category])); - for (var test in testMeansByCategory[category]) { - var shortName = test.replace(/^[^-]*-/, ""); - print(resultLine(labelWidth, 4, shortName, meanWidth, testMeansByCategory[category][test], testStdErrsByCategory[category][test])); - } - } -} - -initialize(); -computeItemTotals(); -computeTotals(); -computeMeans(); -computeStdDevs(); -computeStdErrors(); -printOutput(); diff --git a/SunSpider/resources/sunspider-compare-results.js b/SunSpider/resources/sunspider-compare-results.js deleted file mode 100644 index 24671ea..0000000 --- a/SunSpider/resources/sunspider-compare-results.js +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -function sunspiderCompareResults(output1, output2) -{ - var count1 = output1.length; - var count2 = output2.length; - - var itemTotals1 = {}; - itemTotals1.length = count1; - - var total1 = 0; - var categoryTotals1 = {}; - var testTotalsByCategory1 = {}; - - var mean1 = 0; - var categoryMeans1 = {}; - var testMeansByCategory1 = {}; - - var stdDev1 = 0; - var categoryStdDevs1 = {}; - var testStdDevsByCategory1 = {}; - - var stdErr1 = 0; - var categoryStdErrs1 = {}; - var testStdErrsByCategory1 = {}; - - var itemTotals2 = {}; - itemTotals2.length = count2; - - var total2 = 0; - var categoryTotals2 = {}; - var testTotalsByCategory2 = {}; - - var mean2 = 0; - var categoryMeans2 = {}; - var testMeansByCategory2 = {}; - - var stdDev2 = 0; - var categoryStdDevs2 = {}; - var testStdDevsByCategory2 = {}; - - var stdErr2 = 0; - var categoryStdErrs2 = {}; - var testStdErrsByCategory2 = {}; - - function initialize() - { - itemTotals1 = {total: []}; - - for (var i = 0; i < categories.length; i++) { - var category = categories[i]; - itemTotals1[category] = []; - categoryTotals1[category] = 0; - testTotalsByCategory1[category] = {}; - categoryMeans1[category] = 0; - testMeansByCategory1[category] = {}; - categoryStdDevs1[category] = 0; - testStdDevsByCategory1[category] = {}; - categoryStdErrs1[category] = 0; - testStdErrsByCategory1[category] = {}; - } - - for (var i = 0; i < tests.length; i++) { - var test = tests[i]; - itemTotals1[test] = []; - var category = test.replace(/-.*/, ""); - testTotalsByCategory1[category][test] = 0; - testMeansByCategory1[category][test] = 0; - testStdDevsByCategory1[category][test] = 0; - testStdErrsByCategory1[category][test] = 0; - } - - for (var i = 0; i < count1; i++) { - itemTotals1["total"][i] = 0; - for (var category in categoryTotals1) { - itemTotals1[category][i] = 0; - for (var test in testTotalsByCategory1[category]) { - itemTotals1[test][i] = 0; - } - } - } - - itemTotals2 = {total: []}; - - for (var i = 0; i < categories.length; i++) { - var category = categories[i]; - itemTotals2[category] = []; - categoryTotals2[category] = 0; - testTotalsByCategory2[category] = {}; - categoryMeans2[category] = 0; - testMeansByCategory2[category] = {}; - categoryStdDevs2[category] = 0; - testStdDevsByCategory2[category] = {}; - categoryStdErrs2[category] = 0; - testStdErrsByCategory2[category] = {}; - } - - for (var i = 0; i < tests.length; i++) { - var test = tests[i]; - itemTotals2[test] = []; - var category = test.replace(/-.*/, ""); - testTotalsByCategory2[category][test] = 0; - testMeansByCategory2[category][test] = 0; - testStdDevsByCategory2[category][test] = 0; - testStdErrsByCategory2[category][test] = 0; - } - - for (var i = 0; i < count2; i++) { - itemTotals2["total"][i] = 0; - for (var category in categoryTotals2) { - itemTotals2[category][i] = 0; - for (var test in testTotalsByCategory2[category]) { - itemTotals2[test][i] = 0; - } - } - } - - } - - function computeItemTotals(output, itemTotals) - { - for (var i = 0; i < output.length; i++) { - var result = output[i]; - for (var test in result) { - var time = result[test]; - var category = test.replace(/-.*/, ""); - itemTotals["total"][i] += time; - itemTotals[category][i] += time; - itemTotals[test][i] += time; - } - } - } - - function computeTotals(output, categoryTotals, testTotalsByCategory) - { - var total = 0; - - for (var i = 0; i < output.length; i++) { - var result = output[i]; - for (var test in result) { - var time = result[test]; - var category = test.replace(/-.*/, ""); - total += time; - categoryTotals[category] += time; - testTotalsByCategory[category][test] += time; - } - } - - return total; - } - - function computeMeans(count, total, categoryTotals, categoryMeans, testTotalsByCategory, testMeansByCategory) - { - var mean = total / count; - for (var category in categoryTotals) { - categoryMeans[category] = categoryTotals[category] / count; - for (var test in testTotalsByCategory[category]) { - testMeansByCategory[category][test] = testTotalsByCategory[category][test] / count; - } - } - return mean; - } - - function standardDeviation(mean, items) - { - var deltaSquaredSum = 0; - for (var i = 0; i < items.length; i++) { - var delta = items[i] - mean; - deltaSquaredSum += delta * delta; - } - variance = deltaSquaredSum / (items.length - 1); - return Math.sqrt(variance); - } - - function computeStdDevs(mean, itemTotals, categoryStdDevs, categoryMeans, testStdDevsByCategory, testMeansByCategory) - { - var stdDev = standardDeviation(mean, itemTotals["total"]); - for (var category in categoryStdDevs) { - categoryStdDevs[category] = standardDeviation(categoryMeans[category], itemTotals[category]); - } - for (var category in categoryStdDevs) { - for (var test in testStdDevsByCategory[category]) { - testStdDevsByCategory[category][test] = standardDeviation(testMeansByCategory[category][test], itemTotals[test]); - } - } - return stdDev; - } - - function computeStdErrors(count, stdDev, categoryStdErrs, categoryStdDevs, testStdErrsByCategory, testStdDevsByCategory) - { - var sqrtCount = Math.sqrt(count); - - var stdErr = stdDev / sqrtCount; - for (var category in categoryStdErrs) { - categoryStdErrs[category] = categoryStdDevs[category] / sqrtCount; - } - for (var category in categoryStdDevs) { - for (var test in testStdErrsByCategory[category]) { - testStdErrsByCategory[category][test] = testStdDevsByCategory[category][test] / sqrtCount; - } - } - - return stdErr; - } - - var tDistribution = [NaN, NaN, 12.71, 4.30, 3.18, 2.78, 2.57, 2.45, 2.36, 2.31, 2.26, 2.23, 2.20, 2.18, 2.16, 2.14, 2.13, 2.12, 2.11, 2.10, 2.09, 2.09, 2.08, 2.07, 2.07, 2.06, 2.06, 2.06, 2.05, 2.05, 2.05, 2.04, 2.04, 2.04, 2.03, 2.03, 2.03, 2.03, 2.03, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.96]; - var tMax = tDistribution.length; - var tLimit = 1.96; - - function tDist(n) - { - if (n > tMax) - return tLimit; - return tDistribution[n]; - } - - - function formatMean(meanWidth, mean, stdErr, count) - { - var meanString = mean.toFixed(1).toString(); - while (meanString.length < meanWidth) { - meanString = " " + meanString; - } - - var error = "+/- " + ((tDist(count) * stdErr / mean) * 100).toFixed(1) + "% "; - - return meanString + "ms " + error; - } - - function computeLabelWidth() - { - var width = "Total".length; - for (var category in categoryMeans1) { - if (category.length + 2 > width) - width = category.length + 2; - } - for (var i = 0; i < tests.length; i++) { - var shortName = tests[i].replace(/^[^-]*-/, ""); - if (shortName.length + 4 > width) - width = shortName.length + 4; - } - - return width; - } - - function computeMeanWidth(mean, categoryMeans, testMeansByCategory) - { - var width = mean.toFixed(1).toString().length; - for (var category in categoryMeans) { - var candidate = categoryMeans[category].toFixed(1).toString().length; - if (candidate > width) - width = candidate; - for (var test in testMeansByCategory[category]) { - var candidate = testMeansByCategory[category][test].toFixed(1).toString().length; - if (candidate > width) - width = candidate; - } - } - - return width; - } - - function pad(str, n) - { - while (str.length < n) { - str += " "; - } - return str; - } - - function resultLine(labelWidth, indent, label, meanWidth1, mean1, stdErr1, meanWidth2, mean2, stdErr2) - { - result = pad("", indent); - result += label + ": "; - result = pad(result, labelWidth + 2); - - var t = (mean1 - mean2) / (Math.sqrt((stdErr1 * stdErr1) + (stdErr2 * stdErr2))); - var df = count1 + count2 - 2; - - var statisticallySignificant = (Math.abs(t) > tDist(df+1)); - var diff = mean2 - mean1; - var percentage = 100 * diff / mean1; - var isFaster = diff < 0; - var probablySame = (percentage < 0.1) && !statisticallySignificant; - var ratio = isFaster ? (mean1 / mean2) : (mean2 / mean1); - var fixedRatio = (ratio < 1.2) ? ratio.toFixed(3).toString() : ((ratio < 10) ? ratio.toFixed(2).toString() : ratio.toFixed(1).toString()); - var formattedRatio = isFaster ? fixedRatio + "x as fast" : "*" + fixedRatio + "x as slow*"; - - var diffSummary; - var diffDetail; - - if (probablySame) { - diffSummary = "-"; - diffDetail = ""; - } else if (!statisticallySignificant) { - diffSummary = "??"; - diffDetail = " not conclusive: might be " + formattedRatio; - } else { - diffSummary = formattedRatio; - diffDetail = " significant"; - } - - return result + pad(diffSummary, 18) + formatMean(meanWidth1, mean1, stdErr1, count1) + " " + formatMean(meanWidth2, mean2, stdErr2, count2) + diffDetail; - } - - function printOutput() - { - var labelWidth = computeLabelWidth(); - var meanWidth1 = computeMeanWidth(mean1, categoryMeans1, testMeansByCategory1); - var meanWidth2 = computeMeanWidth(mean2, categoryMeans2, testMeansByCategory2); - - print("\n"); - var header = "TEST"; - while (header.length < labelWidth) - header += " "; - header += " COMPARISON FROM TO DETAILS"; - print(header); - print(""); - print("============================================================================="); - print(""); - print(resultLine(labelWidth, 0, "** TOTAL **", meanWidth1, mean1, stdErr1, meanWidth2, mean2, stdErr2)); - print(""); - print("============================================================================="); - - for (var category in categoryMeans1) { - print(""); - print(resultLine(labelWidth, 2, category, - meanWidth1, categoryMeans1[category], categoryStdErrs1[category], - meanWidth2, categoryMeans2[category], categoryStdErrs2[category])); - for (var test in testMeansByCategory1[category]) { - var shortName = test.replace(/^[^-]*-/, ""); - print(resultLine(labelWidth, 4, shortName, - meanWidth1, testMeansByCategory1[category][test], testStdErrsByCategory1[category][test], - meanWidth2, testMeansByCategory2[category][test], testStdErrsByCategory2[category][test])); - } - } - } - - initialize(); - - computeItemTotals(output1, itemTotals1); - computeItemTotals(output2, itemTotals2); - - total1 = computeTotals(output1, categoryTotals1, testTotalsByCategory1); - total2 = computeTotals(output2, categoryTotals2, testTotalsByCategory2); - - mean1 = computeMeans(count1, total1, categoryTotals1, categoryMeans1, testTotalsByCategory1, testMeansByCategory1); - mean2 = computeMeans(count2, total2, categoryTotals2, categoryMeans2, testTotalsByCategory2, testMeansByCategory2); - - stdDev1 = computeStdDevs(mean1, itemTotals1, categoryStdDevs1, categoryMeans1, testStdDevsByCategory1, testMeansByCategory1); - stdDev2 = computeStdDevs(mean2, itemTotals2, categoryStdDevs2, categoryMeans2, testStdDevsByCategory2, testMeansByCategory2); - - stdErr1 = computeStdErrors(count1, stdDev1, categoryStdErrs1, categoryStdDevs1, testStdErrsByCategory1, testStdDevsByCategory1); - stdErr2 = computeStdErrors(count2, stdDev2, categoryStdErrs2, categoryStdDevs2, testStdErrsByCategory2, testStdDevsByCategory2); - - printOutput(); -} diff --git a/SunSpider/resources/sunspider-standalone-compare.js b/SunSpider/resources/sunspider-standalone-compare.js deleted file mode 100644 index e82c155..0000000 --- a/SunSpider/resources/sunspider-standalone-compare.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -sunspiderCompareResults(output1, output2); diff --git a/SunSpider/resources/sunspider-standalone-driver.js b/SunSpider/resources/sunspider-standalone-driver.js deleted file mode 100644 index 136e6b7..0000000 --- a/SunSpider/resources/sunspider-standalone-driver.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var results = new Array(); - -(function(){ - -var time = 0; -var times = []; -times.length = tests.length; - -for (var j = 0; j < tests.length; j++) { - var testName = suitePath + "/" + tests[j] + ".js"; - var startTime = new Date; - if (testName.indexOf('parse-only') >= 0) - times[j] = checkSyntax(testName); - else - times[j] = run(testName); - gc(); -} - -function recordResults(tests, times) -{ - var output = "{\n"; - - for (j = 0; j < tests.length; j++) { - output += ' "' + tests[j] + '": ' + times[j] + ',\n'; - } - output = output.substring(0, output.length - 2) + "\n"; - - output += "}"; - print(output); -} - -recordResults(tests, times); - -})(); - diff --git a/SunSpider/sunspider b/SunSpider/sunspider deleted file mode 100755 index dbe26cd..0000000 --- a/SunSpider/sunspider +++ /dev/null @@ -1,244 +0,0 @@ -#!/usr/bin/perl -w - -# Copyright (C) 2007 Apple Inc. All rights reserved. -# Copyright (C) 2007 Eric Seidel -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -use strict; -use Getopt::Long; -use File::Basename; -use File::Spec; -use Cwd; -use POSIX qw(strftime); -use Time::HiRes qw(gettimeofday tv_interval); - -my $showHelp = 0; -my $runShark = 0; -my $runShark20 = 0; -my $runSharkCache = 0; -my $ubench = 0; -my $v8suite = 0; -my $suite = ""; -my $parseOnly = 0; -my $jsShellPath; -my $jsShellArgs = ""; -my $setBaseline = 0; -my $testsPattern; -my $testRuns = 10; - -my $programName = basename($0); -my $usage = < \$testRuns, - 'set-baseline' => \$setBaseline, - 'shell=s' => \$jsShellPath, - 'args=s' => \$jsShellArgs, - 'shark' => \$runShark, - 'shark20' => \$runShark20, - 'shark-cache' => \$runSharkCache, - 'suite=s' => \$suite, - 'ubench' => \$ubench, - 'v8-suite' => \$v8suite, - 'parse-only' => \$parseOnly, - 'tests=s' => \$testsPattern, - 'help' => \$showHelp); - - -$suite = "ubench" if ($ubench); -$suite = "v8-v4" if ($v8suite); -$suite = "parse-only" if ($parseOnly); -$suite = "sunspider-0.9.1" if (!$suite); - -my $resultDirectory = "${suite}-results"; - -my $suitePath = $suite; -$suitePath = "tests/" . $suitePath unless ($suite =~ /\//); - -$runShark = 1 if $runSharkCache; -$runShark = 20 if $runShark20; -$testRuns = 1 if $runShark; -if ($runShark && ! -x "/usr/bin/shark") { - die "Please install CHUD tools from http://developer.apple.com/tools/download/\n"; -} - -my $sharkCacheProfileIndex = 0; -if ($runSharkCache) { - my $sharkProfileList = `shark -l 2>&1`; - for my $profile (split(/\n/, $sharkProfileList)) { - $profile =~ /(\d+) - (.+)/; - next unless (defined $1); - my $profileIndex = $1; - my $profileName = $2; - if ($profileName =~ /L2 Cache/) { - $sharkCacheProfileIndex = $profileIndex; - print "Using Shark L2 Cache Miss Profile: " . $profile . "\n"; - last; - } - } - die "Failed to find L2 Cache Miss Profile for --shark-cache\n" unless ($sharkCacheProfileIndex); -} - -if (!$jsShellPath || $showHelp) { - print STDERR $usage; - exit 1; -} - -sub dumpToFile($$) -{ - my ($contents, $path) = @_; - open FILE, ">", $path or die "Failed to open $path"; - print FILE $contents; - close FILE; -} - -my @tests = (); -my @categories = (); -my %uniqueCategories = (); - -sub loadTestsList() -{ - open TESTLIST, "<", "${suitePath}/LIST" or die "Can't find ${suitePath}/LIST"; - while () { - chomp; - next unless !$testsPattern || /$testsPattern/; - - push @tests, $_; - my $category = $_; - $category =~ s/-.*//; - if (!$uniqueCategories{$category}) { - push @categories, $category; - $uniqueCategories{$category} = $category; - } - } - close TESTLIST; -} - -my $timeString = strftime "%Y-%m-%d-%H.%M.%S", localtime $^T; -my $prefixFile = "$resultDirectory/sunspider-test-prefix.js"; -my $resultsFile = "$resultDirectory/sunspider-results-$timeString.js"; - -sub writePrefixFile() -{ - my $prefix = "var suitePath = " . '"' . $suitePath . '"' . ";\n"; - $prefix .= "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n"; - $prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n"; - - mkdir "$resultDirectory"; - dumpToFile($prefix, $prefixFile); -} - -sub runTestsOnce($) -{ - my ($useShark) = @_; - my $shellArgs = $jsShellArgs . " -f $prefixFile -f resources/sunspider-standalone-driver.js 2> " . File::Spec->devnull(); - my $output; - if ($useShark) { - my $intervalArg = $useShark == 20 ? "-I 20u" : ""; - my $cacheArg = $runSharkCache ? "-c $sharkCacheProfileIndex" : ""; - $output = `shark $intervalArg $cacheArg -i -1-q "$jsShellPath" $shellArgs`; - } else { - $output = `"$jsShellPath" $shellArgs | grep -v break`; - } - return $output; -} - -sub newestFile($$) -{ - my ($dir, $pattern) = @_; - - my $newestAge; - my $newestFile = ""; - opendir DIR, $dir or die; - for my $file (readdir DIR) { - if ($file =~ $pattern) { - my $age = -M "$dir/$file"; - if (!defined $newestAge || $age < $newestAge) { - $newestFile = $file; - $newestAge = $age; - } - } - } - closedir DIR; - - return "$dir/$newestFile"; -} - -loadTestsList(); -if ($testsPattern) { - print STDERR "Found " . scalar(@tests) . " tests matching '" . $testsPattern . "'\n"; -} else { - print STDERR "Found " . scalar(@tests) . " tests\n"; -} -die "No tests to run" unless scalar(@tests); -print STDERR "Running SunSpider once for warmup, then " . ($runShark ? "under Shark" : "$testRuns time" . ($testRuns == 1 ? "" : "s")) . "\n"; -writePrefixFile(); - -runTestsOnce(0); -print "Discarded first run.\n"; - -my $result; -my $count = 0; -my @results = (); -my $total = 0; -print "["; -while ($count++ < $testRuns) { - $result = runTestsOnce($runShark); - $result =~ s/\r\n/\n/g; - chomp $result; - push @results, $result; - print $result; - print ",\n" unless ($count == $testRuns); -} -print "]\n"; - -my $output = "var output = [\n" . join(",\n", @results) . "\n];\n"; -dumpToFile($output, $resultsFile); -dumpToFile(File::Spec->rel2abs($resultsFile), "$resultDirectory/baseline-filename.txt") if $setBaseline; - -system("$jsShellPath", "-f", $prefixFile, "-f", $resultsFile, "-f", "resources/sunspider-analyze-results.js"); - -print("\nResults are located at $resultsFile\n"); - -if ($runShark) { - my $newestMShark = newestFile(".", qr/\.mshark$/); - if ($newestMShark) { - my $profileFile = "$resultDirectory/sunspider-profile-$timeString.mshark"; - rename $newestMShark, $profileFile or die; - exec "/usr/bin/open", $profileFile; - } -} diff --git a/SunSpider/sunspider-compare-results b/SunSpider/sunspider-compare-results deleted file mode 100755 index 09b7052..0000000 --- a/SunSpider/sunspider-compare-results +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/perl -w - -# Copyright (C) 2007 Apple Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -use strict; -use Getopt::Long; -use File::Basename; - -my $showHelp = 0; -my $jsShellPath; -my $suite = ""; -my $ubench = 0; -my $v8suite = 0; -my $parseOnly = 0; - -my $programName = basename($0); -my $usage = < \$jsShellPath, - 'suite=s' => \$suite, - 'ubench' => \$ubench, - 'v8-suite' => \$v8suite, - 'parse-only' => \$parseOnly, - 'help' => \$showHelp); - -$suite = "ubench" if ($ubench); -$suite = "v8-v4" if ($v8suite); -$suite = "parse-only" if ($parseOnly); -$suite = "sunspider-0.9.1" if (!$suite); - -my $resultDirectory = "${suite}-results"; - -if ((scalar @ARGV != 0 && scalar @ARGV != 2) || !$jsShellPath || $showHelp) { - print STDERR $usage; - exit 1; -} - -sub readResultsFile($) -{ - my ($filename) = @_; - open FILE, "<", $filename or die; - my $foundStart = 0; - my $foundOutput = 0; - my $foundEnd = 0; - my $result = ""; - while () { - if (!$foundStart) { - if (/^\[\{$/) { - $foundStart = 1; - $result .= $_; - } elsif (/^var \w+ = \[$/) { - $foundOutput = 1; - } elsif ($foundOutput && /^\{$/) { - $foundOutput = 0; - $foundStart = 1; - $result = "[{\n"; - } - } else { - if (/\];?$/) { - $foundEnd = 1; - chomp; - s/;$//; - $result .= $_; - last; - } else { - $result .= $_; - } - } - } - close FILE; - - die "Cound not find data in ${filename} - needs to start with [{" unless $foundStart; - die "Cound not find data in ${filename} - needs to end with }]" unless $foundEnd; - - return $result; -} - -sub dumpToFile($$) -{ - my ($contents, $path) = @_; - open FILE, ">", $path or die; - print FILE $contents; - close FILE; -} - -sub readFile($) -{ - my ($path) = @_; - open FILE, "<", $path or die; - my $result = ; - close FILE; - return $result; -} - -sub newestFile($$) -{ - my ($dir, $pattern) = @_; - - my $newestAge; - my $newestFile = ""; - opendir DIR, $dir or die; - for my $file (readdir DIR) { - if ($file =~ $pattern) { - my $age = -M "$dir/$file"; - if (!defined $newestAge || $age < $newestAge) { - $newestFile = $file; - $newestAge = $age; - } - } - } - closedir DIR; - - return "$dir/$newestFile"; -} - -my $file1; -my $file2; - -if (scalar @ARGV == 2) { - $file1 = $ARGV[0]; - $file2 = $ARGV[1]; -} else { - $file1 = readFile("$resultDirectory/baseline-filename.txt"); - $file2 = newestFile("$resultDirectory", qr/sunspider-results-.+\.js$/); -} - -my $output = "var output1 = " . readResultsFile($file1) . ";\n"; -$output .= "var output2 = " . readResultsFile($file2) . ";\n"; - -dumpToFile($output, "$resultDirectory/sunspider-comparison-data.js"); - -system($jsShellPath, "-f", "$resultDirectory/sunspider-test-prefix.js", "-f", "$resultDirectory/sunspider-comparison-data.js", "-f", "resources/sunspider-compare-results.js", "-f", "resources/sunspider-standalone-compare.js"); diff --git a/SunSpider/tests/parse-only/LIST b/SunSpider/tests/parse-only/LIST deleted file mode 100644 index 7ad5006..0000000 --- a/SunSpider/tests/parse-only/LIST +++ /dev/null @@ -1,4 +0,0 @@ -jquery-1.3.2 -mootools-1.2.2-core-nc -prototype-1.6.0.3 -concat-jquery-mootools-prototype diff --git a/SunSpider/tests/parse-only/concat-jquery-mootools-prototype.js b/SunSpider/tests/parse-only/concat-jquery-mootools-prototype.js deleted file mode 100644 index af4a11b..0000000 --- a/SunSpider/tests/parse-only/concat-jquery-mootools-prototype.js +++ /dev/null @@ -1,12699 +0,0 @@ -/*! - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){ - -var - // Will speed up references to window, and allows munging its name. - window = this, - // Will speed up references to undefined, and allows munging its name. - undefined, - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - // Map over the $ in case of overwrite - _$ = window.$, - - jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); - }, - - // A simple way to check for HTML strings or ID strings - // (both of which we optimize for) - quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - this.context = selector; - return this; - } - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem && elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - var ret = jQuery( elem || [] ); - ret.context = document; - ret.selector = selector; - return ret; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document ).ready( selector ); - - // Make sure that old selector state is passed along - if ( selector.selector && selector.context ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return this.setArray(jQuery.isArray( selector ) ? - selector : - jQuery.makeArray(selector)); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.3.2", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num === undefined ? - - // Return a 'clean' array - Array.prototype.slice.call( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) - ret.selector = this.selector + (this.selector ? " " : "") + selector; - else if ( name ) - ret.selector = this.selector + "." + name + "(" + selector + ")"; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( typeof name === "string" ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text !== "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).clone(); - - if ( this[0].parentNode ) - wrap.insertBefore( this[0] ); - - wrap.map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }).append(this); - } - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: [].push, - sort: [].sort, - splice: [].splice, - - find: function( selector ) { - if ( this.length === 1 ) { - var ret = this.pushStack( [], "find", selector ); - ret.length = 0; - jQuery.find( selector, this[0], ret ); - return ret; - } else { - return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - })), "find", selector ); - } - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var html = this.outerHTML; - if ( !html ) { - var div = this.ownerDocument.createElement("div"); - div.appendChild( this.cloneNode(true) ); - html = div.innerHTML; - } - - return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; - } else - return this.cloneNode(true); - }); - - // Copy the events from the original to the clone - if ( events === true ) { - var orig = this.find("*").andSelf(), i = 0; - - ret.find("*").andSelf().each(function(){ - if ( this.nodeName !== orig[i].nodeName ) - return; - - var events = jQuery.data( orig[i], "events" ); - - for ( var type in events ) { - for ( var handler in events[ type ] ) { - jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); - } - } - - i++; - }); - } - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ - return elem.nodeType === 1; - }) ), "filter", selector ); - }, - - closest: function( selector ) { - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, - closer = 0; - - return this.map(function(){ - var cur = this; - while ( cur && cur.ownerDocument ) { - if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { - jQuery.data(cur, "closest", closer); - return cur; - } - cur = cur.parentNode; - closer++; - } - }); - }, - - not: function( selector ) { - if ( typeof selector === "string" ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector === "string" ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return !!selector && this.is( "." + selector ); - }, - - val: function( value ) { - if ( value === undefined ) { - var elem = this[0]; - - if ( elem ) { - if( jQuery.nodeName( elem, 'option' ) ) - return (elem.attributes.value || {}).specified ? elem.value : elem.text; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - } - - // Everything else, we just grab the value - return (elem.value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if ( typeof value === "number" ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value === undefined ? - (this[0] ? - this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, +i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ), - "slice", Array.prototype.slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - domManip: function( args, table, callback ) { - if ( this[0] ) { - var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), - scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), - first = fragment.firstChild; - - if ( first ) - for ( var i = 0, l = this.length; i < l; i++ ) - callback.call( root(this[i], first), this.length > 1 || i > 0 ? - fragment.cloneNode(true) : fragment ); - - if ( scripts ) - jQuery.each( scripts, evalScript ); - } - - return this; - - function root( elem, cur ) { - return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; - } - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy === "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}, - toString = Object.prototype.toString; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return toString.call(obj) === "[object Function]"; - }, - - isArray: function( obj ) { - return toString.call(obj) === "[object Array]"; - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || - !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && /\S/.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.support.scriptEval ) - script.appendChild( document.createTextNode( data ) ); - else - script.text = data; - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length === undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length === undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames !== undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force, extra ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - - if ( extra === "border" ) - return; - - jQuery.each( which, function() { - if ( !extra ) - val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - if ( extra === "margin" ) - val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; - else - val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - } - - if ( elem.offsetWidth !== 0 ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, Math.round(val)); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // We need to handle opacity special in IE - if ( name == "opacity" && !jQuery.support.opacity ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle ) - ret = computedStyle.getPropertyValue( name ); - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context, fragment ) { - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { - var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); - if ( match ) - return [ context.createElement( match[1] ) ]; - } - - var ret = [], scripts = [], div = context.createElement("div"); - - jQuery.each(elems, function(i, elem){ - if ( typeof elem === "number" ) - elem += ''; - - if ( !elem ) - return; - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and