JSIR: a high-level IR for JavaScript aims to bring AST fidelity and dataflow to tooling

April 8, 2026
Close-up of a hand drawing on a whiteboard, illustrating hope with colorful markers.
Photo by RDNE Stock project on Pexels

What is JSIR?

A new RFC proposes JSIR, a high-level intermediate representation for JavaScript built on MLIR. It preserves all information from the AST, represents control flow with MLIR regions, and exposes dataflow analysis capabilities. The project is open source on GitHub, and it has been reported that JSIR is developed and deployed in production at Google for code analysis and transformation workflows. Bold promise: perfect round-trips between source ↔ AST ↔ JSIR — no weird lossy conversions.

Why JavaScript needs this

JavaScript tooling today lives in the AST world — Babel, ESLint, espree, dozens more — and that’s fine for many tasks. But when you need a control-flow graph or robust dataflow analysis, ASTs start to fray at the edges. Enter JSIR: it aims to give language-specific, high-level IR features that compilers for Rust and Swift already exploit. Sound familiar? The compiler industry is trending toward this approach, with projects like Clang IR, Mojo, and Carbon following suit. So: can an IR that maps 1:1 to ESTree nodes finally give JavaScript engineers the best of both worlds?

Design goals and real use cases

JSIR’s design explicitly targets source-level fidelity rather than low-level JIT optimizations. It allegedly allows full source-to-source transformations — think decompilation of Hermes bytecode back into readable JavaScript, or deobfuscation pipelines that can be combined with LLMs. It has been reported that the team plans to present a paper on combining the Gemini LLM and JSIR for deobfuscation at ICSE 2026. Pragmatically, JSIR follows ESTree closely and exposes a dataflow framework on top of MLIR so developers can run analyses that were awkward or brittle on pure ASTs.

The pitch — and the catch

If JSIR works as advertised, it could shift how the JavaScript ecosystem builds analyzers, transformers, and decompilers — moving from brittle AST hacks to a stable, testable IR layer. But adoption will be the test: the community has a rich AST ecosystem and carving out mindshare will take time. Still — for anyone tired of wrestling with edge-case-driven AST tooling, JSIR reads like a promise to make complex transformations less like duct tape and more like proper engineering. Worth watching.

Sources: llvm.org, Hacker News