tessel/runtime — pull request #147 by tcr (2014-06-19 19:47:23+00:00)
Title: Refactors arrays to reuse metatable, encode length as property

This PR is a bit of a mess. I should refactor the commits. Mostly it needs testing; it currently passes the runtime test suite.

Instead of allocating a separate metatable for each array, we reuse one. The length, formerly encoded in the metatable, is now a stock (unwritable) object. This speeds up array creation heavily and leads us a path toward embedding all getter/setter behavior in the VM rather than in metatable overrides.