In a previous blog post, we introduced the kind of work the Igalia compilers team does and gave a mid-year update on our 2020 progress.
Now that we have made our way into 2021, we wanted to recap our achievements from 2020 and update you on the exciting improvements we have been making to the web programming platform. Of course, we couldn’t have done this work alone; all of this was brought to you through our collaborations with our clients and upstream partners in the web ecosystem.
https://www.twitter.com/rkirsling/status/1276299298020290561
JavaScript class features
Our engineers at Igalia have continued to push forward on improvements to JS classes. Earlier in 2020, we had landed support for public field declarations in JavaScriptCore (JSC). In the latter half of 2020, we achieved major milestones such as getting private class fields into JSC (with optimizing compiler support!):
https://www.twitter.com/robpalmer2/status/1276378092349657095
https://www.twitter.com/caitp88/status/1318919341467979776
as well as static public and private fields.
We also helped ship private methods and accessors in V8 version 84. Our work on private methods also landed in JSC and we expect it to be available in future releases of Safari.
These additions will help JS developers create better abstractions by encapsulating state and behavior in their classes.
TC39 and Temporal
Our compilers team also contributed throughout 2020 to web standards through its participation in TC39 and related standards bodies.
One of the big areas we have been working on is the Temporal proposal, which aims to provide better date and time handling in JS. When we blogged about this in mid-2020, the proposal was still in Stage 2 but we’re expecting it to go Stage 3 soon in 2021. Igalians have been working hard on many aspects of the proposal since mid-2020, including managing community feedback, working on the polyfill, and maintaining the documentation.
For more info on Temporal, also check out a talk by one of engineers, Ujjwal Sharma, at Holy JS 2020 Piter.
We (@TechAtBloomberg, @igalia + others @TC39) have been working on a new proposed built-in library for JS date and time called Temporal. If you want to know more here's a blog post. https://t.co/7GjTeWIou5 Please try it out and give feedback!
— Jason Williams (@Jason_williams) June 25, 2020
Another area we have been contributing to for a number of years is the ECMA-402 Internationalization (Intl) standard, an important effort that provides i18n support for JS. We help maintain and edit the specification while also contributing tests and pushing Intl proposals forward. For example, we helped with the test suite of the Intl.Segmenter
feature for implementing localized text segmentation, which recently shipped in Chrome. For a good overview of other recent Intl efforts, check out these slides from IUC44.
We’re also contributing to many other proposed features for JS, such as WeakRefs, Decimal (Daniel Ehrenberg from our team gave a talk on this at Node.TLV 2020), Import Assertions, Records & Tuples, Top-level await, and Module blocks & module bundling (Daniel also gave a talk on these topics at Holy JS 2020 Moscow).
Node.js
In addition to our contributions to the client side of the web, we are also contributing to server side use of web engines. In particular, we have continued to contribute to Node.js throughout 2020.
Some notable contributions include adding experimental support for per-context memory measurements in version 13 during early 2020.
Since late 2020, we have been working on improving Node.js startup speed by moving more of the bootstrap process into the startup snapshot. For more on this topic, you can watch a talk that one of our engineers, Joyee Cheung, presented at NodeConf Remote 2020 here (slides are available here).
@JoyeeCheung has been working on #nodejs startup, one of the projects strategic initiatives. Fast startup has been one of the key parts of the success of #nodejs so its great to see it being improved. https://t.co/VC1FOucV7x
— Michael Dawson (@mhdawson1) November 3, 2020
JSC support on 32-bit platforms
Our group also continues to maintain support in JSC for 32-bit platforms. Earlier in 2020 we contributed improvements to JSC on 32-bit such as tail call optimizations, support for checkpoints, and others.
Since then we have been optimizing LLInt (the low-level interpreter for JSC) on 32-bit, and porting the support of inline caching for delete operations to 32-bit (to improve the performance of delete, you can read about the background on the original optimization from the Webkit blog here).
We also blogged about our efforts to support the for-of
intrinsic on 32-bit to improve iteration on JS arrays.
At @igalia we not only do a lot of feature development on JSC 64bits but also on 32bits (ARMv7 and MIPSel). Here's a brief tour of the implementation of the for-of intrinsic for JSC 32bit that landed a few months ago: https://t.co/RFUmJXglCH #webkit #javascriptcore #javascript
— Paulo Matos (@pocmatos) November 20, 2020
WebAssembly
Finally, we have made a number of contributions to WebAssembly (Wasm), the new low-level compiler-target language for the web, on both the specification and implementation sides.
During 2020, we helped ship and standardize several Wasm features in web engines such as support for multiple-values, which can help compilers to Wasm produce better code, and support for BigInt/I64 conversion in the JS API, which lifts a restriction that made it harder to interact with Wasm programs from JS.
The WebAssembly multi-value proposal has been implemented and enabled by default in @FirefoxNightly.
Many thanks to @andywingo (@igalia) for implementing this and @TechAtBloomberg for supporting it. https://t.co/Ey2Zu5rHDh
— SpiderMonkey (@SpiderMonkeyJS) April 8, 2020
We’ve also improved support in tools such as LLVM for the reference types proposal, which adds new types to the language that can represent references to values from JS or other host languages. Eventually reference types will be key to supporting the garbage collection proposal (in which references are extended to new struct and array types), which will allow for easier compilation of languages that use GC to Wasm.
As part of my work with @igalia , @llvmorg now supports the `.tabletype` directive and multiple tables during object generation in WebAssembly. This is the first step towards support of the reference types proposal. https://t.co/EWszZvBHWe #wasm #llvm
— Paulo Matos (@pocmatos) October 15, 2020
We’re also actively working on web engine support for exception handling, reference types, and other proposals while continuing to contribute to tools and specification work. We plan to help ship more WebAssembly features in browsers during 2021, so look forward to our mid-year update post!