Hacker News new | ask | show | jobs
by maximilianburke 5605 days ago
Using languages with runtime code generation is also quite difficult with modern consoles that don't let you change executable memory pages, or allocate new ones, which means you're stuck compiling offline. Even though changing PPU code is off limits, the PS3 does let you generate SPU code on the fly but it seems to be a capability that few (if any) use.
1 comments

That's only a problem if you are using JIT compilation. Otherwise a VM (whose executable doesn't change) would just handle the runtime stuff, which is mostly going to be game logic and not super-high-performance stuff (like rendering or audio).
Ahh, but the beauty of GOAL was that the entire game was built using it, including the super-high performance stuff.

GOAL compiled to native code, which made this possible. It also made it easy to mix and match assembly primitives in with your existing code, using the same syntax (much nicer than GCC's intrinsics).

This was before the days of LLVM, so the code generation phase was actually enormous amount of work (Andy spent a lot of time on the register coloring, for example) - not to mention having to write a debugger.