What’s new in Google’s V8 JavaScript engine Version 7

The V8 Version 7.4 beta lays the groundwork for possible future iOS support

1 2 Page 2
Page 2 of 2

In another JavaScript programming improvement, the catch clause of try statements can be used without a parameter, which is useful if there is no need for an exception object in the code handling the exception.

Aside from JavaScript, a code cache after execution capability in Version 6.6 lets more functions be included in the cache, with functions no longer needing to be compiled on future page loads. Compile and parse times in hot load scenarios—in which Chrome visits a page for a third time and provides code previous cached—are reduced. As a result, loading is faster and smoother.

Other capabilities featured in V8 Version 6.6 include:

  • More mitigations to prevent information leaks to untrusted JavaScript and WebAssembly code.
  • Compile times have been improved by moving out or deprecation of remaining functionality related to AST numbering. A previous compilation process had required a postparsing stage dubbed AST numbering, where nodes in a syntax tree were numbered so compilers using it would have a common point of reference. But this postprocessing pass had ballooned to include other functionality. A new pipeline introduced last year eliminated the need for the numbering, but the numbering pass had remained until Version 6.6.
  • Asynchronous and array performance has been improved.

Previous version: What’s new in V8 Version 6.5

Released in February 2018, in V8 Version 6.5’s streaming compliation, WebAssembly modules are compiled while module bytes are still being downloaded. When all bytes of a single function have been downloaded, the function is passed to a background thread for compilation. As a result, WebAssembly compilation in Chrome 65 can maintain a 50Mbps download speed on high-end machines, Google says—meaning that if WebAssembly is downloaded at that speed, compilation finishes as soon as the download is done.

 Other improvements in the Version 6.5 branch include:

  • An untrusted code mode, developed in response to a speculative side-channel Spectre attack. This mode is suitable for applications processing user-generated, untrusted code and is enabled by default.
  • A mechanism to detect and prevent a deoptimization loop. This loop occurs when optimized code deoptimizes and there is no way to find out what went wrong. V8 developers also have inlined many JavaScript builtins that had been excluded because of a side effect between the load of a function to call and the call itself.

Copyright © 2019 IDG Communications, Inc.

1 2 Page 2
Page 2 of 2