Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(247)

Issue 4298058: fix playground benchmarks (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 4 months ago by felix8a
Modified:
15 years, 4 months ago
Reviewers:
Jasvir
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

* moved benchmark examples into a subdir "sunspider" * all the benchmark examples relied on including a script <script src="sunspider-record-result.js"></script> I'm not clear how the cajoler is supposed to resolve those relative links; deferring that to later. for now I'm just inlining the record() function. * date-format-xparb relies extensively on eval(), it defines functions using eval. it woulld need to be completely rewritten to work, so I just removed it from the list of examples. * date-format-tofte uses eval() to run functions in the local scope. I replaced that eval with a lookup table. * date-format-tofte tries to verify if Date#getFullYear works, in a way that fails if you're in the wrong timezone, and then falls back to getYear, which is deprecated, and not available in es53. the code should be using Date#getUTCFullYear, but for some reason none of the UTC methods are whitelisted in es53.js (maybe pending implementation of compatibility shims?) I changed the benchmark so that the getFullYear test succeeds. * date-format-tofte uses Date#setTime, which for some reason didn't get whitelisted in es53.js, so I added it to the whitelist. afaik setTime works on all browsers, so it doesn't need a compatibility shim. * string-tagcloud tries to define Object.prototype.toJSONString, which fails. I ripped out all that code and used the JSON object instead. * string-validate-input tries to assign some globals without declaring them, which fails in es53, so I added 'var'. with this change, every benchmark example works for me (though it's not clear if all the benchmarks work correctly, which is a problem with sunspider itself.)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -291 lines) Patch
M build.xml View 2 chunks +6 lines, -4 lines 0 comments Download
M src/com/google/caja/demos/playground/client/ui/Example.java View 1 chunk +32 lines, -27 lines 0 comments Download
D src/com/google/caja/demos/playground/setup-valija.js View 1 chunk +0 lines, -5 lines 0 comments Download
M src/com/google/caja/es53.js View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/js/sunspider-benchmark/3d-cube.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/3d-morph.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/3d-raytrace.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/access-binary-trees.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/access-fannkuch.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/access-nbody.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/access-nsieve.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/bitops-3bit-bits-in-byte.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/bitops-bits-in-byte.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/bitops-bitwise-and.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/bitops-nsieve-bits.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/controlflow-recursive.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/crypto-aes.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/crypto-md5.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/crypto-sha1.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/date-format-tofte.html View 11 chunks +67 lines, -38 lines 0 comments Download
M third_party/js/sunspider-benchmark/date-format-xparb.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/math-cordic.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/math-partial-sums.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/math-spectral-norm.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/regexp-dna.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/string-base64.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/string-fasta.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/string-tagcloud.html View 2 chunks +9 lines, -190 lines 0 comments Download
M third_party/js/sunspider-benchmark/string-unpack-code.html View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/js/sunspider-benchmark/string-validate-input.html View 1 chunk +11 lines, -4 lines 0 comments Download

Messages

Total messages: 2
felix8a
15 years, 4 months ago (2011-03-23 20:01:19 UTC) #1
Jasvir
15 years, 4 months ago (2011-03-23 21:43:44 UTC) #2
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b