JavaScript bytecode compiler?

For a project I'm working on tangentially, I need a way to compile JavaScript into some intermediate language or bytecode so that I can execute it in one step. I know that many of the JavaScript engines in modern browsers do something similar, but they do not make accessible bytecode available. Is there any good off-the-shelf tool for compiling this kind of JavaScript?

+3
source share
1 answer

Not quite sure about your needs, however, perhaps Rhino might work for you.

The JavaScript compiler translates the JavaScript Source into the Java files class. The resulting Java class files can be loaded and executed another time, providing a convenient method for transmitting JavaScript and to avoid the cost of translation.

Read more about the compilation function here .

+4
source

All Articles