Hacker News new | ask | show | jobs
by cks 4321 days ago
An ECMAScript to C compiler. Sort of the inverse of Emscripten. The goal was to compile ECMAScript to LLVM IR but it's not quite there yet. It currently implements version 5.1 and nearly has full test262 coverage: https://github.com/kindahl/descripten
1 comments

This one could actually be very useful for selectively optimising JavaScript modules by transpiling to C, optimising it, then transpiling it back with Emscripten.

For that kind of work it doesn't need to be perfect. The output doesn't even need to compile first time. It's just a way to save time by starting with a scaffold and refactoring, rather than writing from scratch.

Not sure if I'll get around to forking it anytime soon, but I've bookmarked it for future reference, as I could see myself using it in the not-too-distant future.