Thanks.
A slight detail. When doing conversions to string, you should probably do String(x) instead of x.toString(), because some values (eg: undefined) can't have method calls. I will change this in the array code.
- Maxime
On 2011-02-14, at 6:07 PM, Maxime Chevalier-Boisvert wrote:
String comparison isn't yet really implemented. Right now it probably compares the pointers. To be fixed.
However, what I meant is that in V8, the sort function seems to sort the numbers as if they were strings by default:
d8> a = [3, 4, 34] 3,4,34 d8> a.sort() 3,34,4
OK. I fixed the default comparison function (but it will only work when string comparison works).
Are you sure that V8 removes everything? The following test says the
contrary:
% d8 V8 version 3.1.1 [console: dumb] d8> var a = [1,2,3]; d8> a.splice(0); 1,2,3
d8> var a = [1,2,3]; d8> b = a.splice(0) 1,2,3 d8> b 1,2,3 d8> a
d8>
OK. The problem is fixed.
I have put the unit tests in the right place, and done a push.
Marc
Tachyon-list mailing list Tachyon-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/tachyon-list