JSIR: A High-Level IR for JavaScript
![[RFC] JSIR: A High-Level IR for JavaScript - MLIR - LLVM Discussion Forums](https://pub-90f0ac00d93c47daac3e1d2cdd28d496.r2.dev/articles/3c76d3d29a00115e08d7d3fedf4ee650.webp)
discourse.llvm.org
April 8, 2026
14 min read
48/100
Summary
JSIR is a high-level intermediate representation for JavaScript that preserves all information from the abstract syntax tree (AST) and supports high-fidelity round-trip conversions between source code, AST, and JSIR. It utilizes MLIR regions for representing control flow structures and is deployed in production at Google for code analysis and transformation use cases, with open-source availability on GitHub.
Key Takeaways
- JSIR is a high-level intermediate representation (IR) for JavaScript that preserves all information from the abstract syntax tree (AST) and allows for a high-fidelity round-trip between source code, AST, and JSIR.
- JSIR is developed and used in production at Google for code analysis and transformation tasks, including decompilation and deobfuscation of JavaScript code.
- JSIR utilizes MLIR regions to represent control flow structures and supports dataflow analysis, addressing the need for a high-level IR specifically for JavaScript.
- JSIR is open source and aims to fill the gap in the JavaScript community for an IR-based tool, closely following the ESTree standard for compatibility.
Coverage & discussions
Hacker News · discourse.llvm.org
Community discussions
Historical count: 5 · 5 saved in sample · Historical sample
Analysis ready
Community Sentiment
Positives
- If the JSIR project can successfully prove bi-directional source to MLIR transformation, it could enable innovative source-to-source compilers across multiple languages, enhancing interoperability.
- The design philosophy of JSIR prioritizes high-fidelity round-trips back to source, which is crucial for tools like deobfuscators and transpilers that need to maintain human-readable code.
Concerns
- It's unclear how introducing JSIR benefits tool authors or users, given that current AST-based JS tools are functioning well and face numerous roadblocks.
- The mention of the outdated 'Google Closure Compiler' as an example raises skepticism about the relevance and effectiveness of JSIR in modern development.




