from Hacker News

Ask HN: Can JavaScript be treated like machine language?

by mmanulis on 8/9/17, 5:33 PM with 8 comments

I'm wondering if it's possible to treat JS as if it's a CPU instruction set and then building a compiler back-end for Clang or GCC for it.

Even if it's not possible for Clang or GCC, any reason(s) why JS cannot be treated as a machine language, potentially using a subset of it in the beginning.

I imagine the "model" would be centered around DOM manipulation and AJAX facilities.

I'm sure I'm not the first one to ask this, if people have relevant links to share, would love to see them.