JSIR: A High-Level IR for JavaScript
19 points
by nnx
2 hours ago
| 4 comments
| discourse.llvm.org
| HN
jcuenod
1 hour ago
[-]
I came across this project in the last couple of days too. Being able to decompile from Hermes bytecode sounds awesome.

Here's the repo: https://github.com/google/jsir (it seems not everything is public).

Here's a presentation about it: https://www.youtube.com/watch?v=SY1ft5EXI3I (linked in from the repo)

reply
sheepscreek
1 hour ago
[-]
This is exciting stuff!

My interpretation: If the JSIR project can successfully prove bi-directional source to MLIR transformation, it could lead to a new crop of source to source compilers across different languages (as long as they can be lowered to MLIR and back).

Imagine transmorphing Rust to Swift and back. Of course you’d still need to implement or shim any libraries used in the source language. This might help a little bit with C++ to Rust conversions - as more optimizations and analysis would now be possible at the MLIR level. Though I won’t expect unsafe code to magically become safe without some manual intervention.

reply
hajile
1 hour ago
[-]
I want them to finish the official TC39 binary AST proposal. Nearly twice as fast to parse and a bit smaller than minified code makes it a pretty much universally useful proposal.

https://github.com/tc39/proposal-binary-ast

reply
croes
52 minutes ago
[-]
reply
tamimio
8 seconds ago
[-]
Thank you, half way through the article and I am thinking infrared.
reply