[Pl-seminar] [PL Seminar] Seminar tomorrow: Chris Fallin

Michelle Thalakottur michelledt.neu at gmail.com
Mon Apr 15 15:50:03 EDT 2024


Hi all,

Tomorrow at our PL Seminar, Chris Fallin from Fastly (https://cfallin.org/) will be visiting and talking about his work running JavaScript applications on WebAssembly based platforms.
Where: WVH 366
When: Tomorrow Apr 15, 12:30-1:30. Lunch will be served 12-12:30

Title: wevaling the wasms: AOT JS Compilation (or: Stuffing a Dynamic Language onto a Very Static Platform)

Abstract: WebAssembly (Wasm) is a simple, formally specified, low-level bytecode format that is designed to be a good compilation target for statically-typed languages such as C, C++, and Rust (among others). It has excellent sandboxing properties, and has thus seen adoption in applications where untrusted user code must run. Unfortunately, the story for dynamically-typed (and otherwise highly dynamic) languages such as JavaScript running on Wasm-based platforms is less well-developed: the state of the art is to embed an interpreter within a Wasm module and package it with bytecode.
In this talk, I walk through (i) background on Wasm-based platforms and why they are attractive; (ii) difficulties that Wasm, as a highly static environment, presents to languages traditionally accelerated by a JIT compiler; and (iii) outline one path to achieve ahead-of-time compilation of such languages to Wasm modules without JIT.
The key insight of this work is that WebAssembly provides a novel opportunity to apply partial evaluation to get a compiler "for free" out of an interpreter. I will outline how we first developed and upstreamed a new high-performance interpreter tier in the SpiderMonkey JS engine, then developed a partial evaluator called "weval" for Wasm that, together with the upstreamed interpreter with minimal changes, produces fully ahead-of-time-compiled code from JS source, encapsulating all remaining dynamism in the inline-cache mechanism. This results in a ~2x speedup overall, with ~4x on some microbenchmarks and potential for higher.
Best,
Michelle.
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the pl-seminar mailing list