ChowJS: An AOT JavaScript engine for game consoles

# · 🔥 120 · 💬 32 · 2 years ago · mp2.dk · matpow2 · 📷
To make that happen, we made us of ChowJS, our ahead-of-time JavaScript compiler and runtime which can target game consoles. Note 2: ChowJS is not directly related to Chowdren, which is our compiler and runtime for Clickteam Fusion and Construct 3. We are now happy to present our solution to this: a JavaScript engine called ChowJS. Sidenote about related work: As far as we are aware, Hermes is the only production-quality AOT compiler for JS. Unfortunately, it only compiles to bytecode and not machine code, and does not support all the features we need. Some non-public compilers have also been made for specific games, like Rob's JavaScript Haxe compiler. Uses an AOT compiler to generate fast machine code using an SSA IR. Highly configurable optimizations. For each method, we transform the bytecode of the method to our IR. perform several passes and optimizations over the IR. translate the IR to C and compile it to machine code.... For AOT compilation, it is critical that we have access to the startup JS context, since this makes user objects, prototypes and methods available to us at compile time and makes optimization a lot more straightforward. Future Implementing a type of "Profile-guided optimization" would benefit ChowJS a lot, and could allow us to make many more assumptions about types and object shapes that we cannot infer at compile time.
ChowJS: An AOT JavaScript engine for game consoles



Send Feedback | WebAssembly Version (beta)