Good job :)
I added support for arrays last Friday. This includes dynamic resizing when assigning out of bounds, and assigning to the length property. I'll attack closures with Erick this Monday if he's available (some minor tweaks may be needed in the backend). I think we can have that done by Wednesday.
What's missing after that is the arguments object, which may actually be fairly easy to implement, and then the rest should be a matter of fixing bugs and adding minor bits of missing functionality here and there. I'm assuming we don't really need exceptions to go through the initial bootstrap.
- Maxime
On 11-01-30 12:19 AM, Marc Feeley wrote:
I've implemented a bunch of Array library functions in stdlib/arrays.js . The code includes unit tests. Specifically the following functions are implemented:
Array.prototype.toString Array.prototype.concat Array.prototype.join Array.prototype.pop Array.prototype.push Array.prototype.reverse Array.prototype.shift Array.prototype.slice Array.prototype.sort Array.prototype.splice Array.prototype.unshift Array.prototype.indexOf Array.prototype.lastIndexOf Array.prototype.forEach Array.prototype.map Array.prototype.filter
For the sort function I have used a non-recursive version of mergesort which I designed from scratch (I'd be interested to know if this algorithm already exists).
To activate the functions, the assignments of the form
Array.prototype.array_toString = array_toString;
must be changed to
Array.prototype.toString = array_toString;
Marc
Tachyon-list mailing list Tachyon-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/tachyon-list