JavaScript Engine: V8 9.5 Extends Internationalization

0

Google has released version 9.5 of the V8 JavaScript engine. The changes mainly aim at a broader internationalization for dates and calendars as well as for the exit of time zones. It also implements a proposal for handling exceptions in WebAssembly.

The JavaScript API for international names Intl.DisplayNames knows V8 since version 8.1. Now google got them for types calendar and dateTimeField extended. The latter gives the names of date identifiers such as month or year in the respective national language, while the former translates the calendar name of a specific region, with the calendar language and region not having to be the same. The following example from the V8 blog illustrates the use of the new types:

const esCalendarNames = 
  new Intl.DisplayNames(['es'], { type: 'calendar' });
const frDateTimeFieldNames = 
  new Intl.DisplayNames(['fr'], { type: 'dateTimeField' });
esCalendarNames.of('roc');  // "calendario de la República de China"
frDateTimeFieldNames.of('month'); // "mois"

Additionally, V8 9.5 extends API to specify time zone Intl.DateTimeFormat by four additional options for timeZoneName: shortGeneric gives the abbreviated form of the pure time zone, i.e. independent of daylight saving time, for example as MEZ off and longGeneric is the long form of the time zone like Mitteleuropäische Zeit. shortOffset shows the time relative to the Greenwich Mean Time as, for example GMT+1, while longOffset the difference in four-digit format: GMT+0100.


Of September 29 to 30, 2021 hosted Developer Heise in the same way dpunkt.Editor yet another online edition of the conference for JavaScript for business. EnterJS offers developers an up-to-date overview of trends and technologies in the JavaScript world. This time, the program is particularly varied with more than 35 conferences and 4 workshops. Three tracks per day cover JavaScript frameworks Angular, Node.js, Vue.js, React, TypeScript, Flutter and Svelte as well as tools and techniques related to the programming language. Resiliency, maintainability, and authentication as well as desktop automation (yes, there’s something JavaScript for that too) are some of the main topics. More information about the program and tickets offers the conference website.

For WebAssembly (Wasm), V8 defines Exception Handling Proposal (Wasm EH). Modules compiled accordingly have much less overhead than the previously used detour via JavaScript. As a test balloon, the V8 team compiled the binary optimizer with the old and new implementation of exception handling. Compared to code without exception handling, the result with JavaScript work was about 43% better than without exception handling and with Wasm EH only 8%.

In addition, Google has divided the central v8.h header file into several parts that can be integrated individually. Other innovations of version 9.5 are available on the V8 blog. As usual, the engine is in beta until the stable version of Chrome 95 appears.


(rme)

Source of the article

Disclaimer: This article is generated from the feed and is not edited by our team.

Categories Technology


Source link

Share.

About Author

Leave A Reply