Thanks for the comments - I corrected them and encapsulated the test in a loop
running 10 times to make sure we hit the cache (I don't think we will hit it
until the third time)


http://codereview.chromium.org/1756013/diff/1/2
File test/mjsunit/regress/regress-crbug-40931.js (right):

http://codereview.chromium.org/1756013/diff/1/2#newcode34
test/mjsunit/regress/regress-crbug-40931.js:34: var names =
"a,b,c,d".split(/,/);
On 2010/04/26 11:28:34, Lasse Reichstein wrote:
Try doing the split twice with the same arguments.
The bug was introduced by caching, so it's a better test the result
after
caching has happened.
Actually i discovered (when looking into this) that the cache is not hit
until the third time - I added a for loop testing this ten times.

http://codereview.chromium.org/1756013/diff/1/2#newcode37
test/mjsunit/regress/regress-crbug-40931.js:37: for(i in names) {
On 2010/04/26 11:28:34, Lasse Reichstein wrote:
You are assuming iteration order, which isn't guaranteed by
specification.
Instead collect the keys in an array, then sort and join them before
comparing.
Done

http://codereview.chromium.org/1756013/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to