V8 release v4.7

Published · Tagged with release

Roughly every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git master immediately before Chrome branches for a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 4.7, which will be in beta until it is released in coordination with Chrome 47 Stable. V8 v4.7 is filled with all sorts of developer-facing goodies, so we’d like to give you a preview of some of the highlights in anticipation of the release in several weeks.

Improved ECMAScript 2015 (ES6) support #

Rest operator #

The rest operator enables the developer to pass an indefinite number of arguments to a function. It is similar to the arguments object.

// Without rest operator
function concat() {
var args = Array.prototype.slice.call(arguments, 1);
return args.join('');
}

// With rest operator
function concatWithRest(...strings) {
return strings.join('');
}

Support for upcoming ES features #

Array.prototype.includes #

Array.prototype.includes is a new feature that is currently a stage 3 proposal for inclusion in ES2016. It provides a terse syntax for determining whether or not an element is in a given array by returning a boolean value.

[1, 2, 3].includes(3); // true
['apple', 'banana', 'cherry'].includes('apple'); // true
['apple', 'banana', 'cherry'].includes('peach'); // false

Ease the pressure on memory while parsing #

Recent changes to the V8 parser greatly reduce the memory consumed by parsing files with large nested functions. In particular, this allows V8 to run larger asm.js modules than previously possible.

V8 API #

Please check out our summary of API changes. This document gets regularly updated a few weeks after each major release. Developers with an active V8 checkout can use git checkout -b 4.7 -t branch-heads/4.7 to experiment with the new features in V8 v4.7. Alternatively you can subscribe to Chrome's Beta channel and try the new features out yourself soon.