4 ms·
The article presents a copy and patch jit as something new, but I remember DOS's quickbasic doing the same thing. It generated very bad assembly code in memory
by hyperman1 3y ago
The article presents a copy and patch jit as something new, but I remember DOS's quickbasic doing the same thing. It generated very bad assembly code in memory by patching together template assembly blocks with filled in values, with a lot of INT instructions toward the quickbasic runtime, but it did compile, not interprete.
- chc4 3y agoTemplate JITs in general aren't a new technique, but Copy-and-Patch is a specific method of implementing it (leveraging a build time step to generate the templates from C code + ELF relocations).
- PeterisP 3y agoTIL! I had used qbasic back in school, but I somehow always assumed that these basics were interpreters.
- rpeden 3y agoQBasic was a slightly cut down version of Quickbasic that didn't include the compiler, so your assumption was correct in that case. QBasic was bundled with DOS but you had to buy Quickbasic.
- hyperman1 3y agoI always assumed, because they where so similar, that they both were compilers, generating executable code in memory. qbasic just had the option to write a standalone .exe removed. I just saw the quickbasic compiler output, though, no idea if this guess is true. Now I wonder if a compiled executable was faster than an in-memory application.