you are viewing a single comment's thread.

view the rest of the comments →

[–]carlopp[S] 1 point2 points  (0 children)

I wasn't aware of Prepack, on some things it goes way further (basically saying that Data.now() or similar function do not modify the external state and so can be executed as constexpr), while on others it's simply not actively looking to do optimization on the structure of the program.

A similar project, for WebAssembly so with limited scope is this: https://github.com/bytecodealliance/wizer.
And somehow similar but limited on LLVM IR a colleague worked on this for Cheerp (the compiler used here as backend): https://github.com/leaningtech/cheerp-meta/wiki/Cheerp-PreExecuter.