Owing to a few abortive attempts to make this code work on v8, there is little consistency of which primitives are used (such as array destructuring).
Also, ES6 changed array comprehensions from the SpiderMonkey style, so these need to be replaced as well.