3 ms·
> where an interpreter is used for the outer loop and a compiler for the inner loop That's just a standard JIT isn't it? Also - note there are multiple ways t
by chrisseaton 4y ago
> where an interpreter is used for the outer loop and a compiler for the inner loop
That's just a standard JIT isn't it?
Also - note there are multiple ways to automatically make a compiler from an interpreter, so really you just need the interpreter.
- rgrmrts 4y agoWhat's a good starting point for someone to study that? Specifically going from an interpreter to a compiler automatically. Are there any special considerations before implementing the interpreter? I'm vaguely familiar with RPython which I think delivers on that. For context: I'm just a hobbyist interested in PLs and want to learn more about JITs, I found Crafting Interpreters super helpful for a lot of foundational knowledge.
- chrisseaton 4y agoYeah RPython and Truffle/Graal are the two major implementations of this idea today. https://www3.hhu.de/stups/downloads/pdf/BoCuFiRi09_246.pdf https://www3.hhu.de/stups/downloads/pdf/BoCuFiRi09_246.pdf https://chrisseaton.com/truffleruby/pldi17-truffle/pldi17-truffle.pdf https://chrisseaton.com/truffleruby/pldi17-truffle/pldi17-tr...
- comment500 4y agoChakraCore, the former JavaScript engine of Microsoft's Edge browser, has in its repo a decent high-level description of how its JIT compilation is integrated: https://github.com/chakra-core/ChakraCore/wiki/Architecture-Overview https://github.com/chakra-core/ChakraCore/wiki/Architecture-... I found the source code to be quite readable too, last time I delved into it. Also its command line tool ("ch"), when compiled in debug mode, has loads of options available to show what it's doing internally when it executes a JavaScript program.
- moonchild 4y agoSome jits have a very cheap baseline compiler. This is nice vs the interpreter because you don't need to worry about abi.