4 ms·
Do you think for something to be a JIT it must only compile code immediately before it's used? In that case the only real JIT I know of is basic-block-versioni
by chrisseaton 9y ago
Do you think for something to be a JIT it must only compile code immediately before it's used?
In that case the only real JIT I know of is basic-block-versioning. I think almost all JITs will compile branches or methods to some extent before they are actually needed.
Yours is probably not a reasonable definition therefore. I think a JIT is just a compiler that can compile as the program is running.
- rcthompson 9y ago> Do you think for something to be a JIT it must only compile code immediately before it's used? I mean, that's more or less what the name "just-in-time compiler" implies. I'm aware that the name is not necessarily a precise definition, but I'm not sure how far the definition stretches. Does JIT have a precise agreed-upon definition, or is it somewhat more vaguely defined?
- chrisseaton 9y agoNo these terms never have precise meanings, and trying to debate them too much doesn't achieve much. But if your definition doesn't actually work for any examples of the thing you're defining at all except one then it's probably wrong.
- rcthompson 9y agoOk, fair enough. I was worried that there was some precise definition I had missed, but if that's not the case, I agree there's no point in debating it.
- emn13 9y agoWell, there's at least one definition that's pretty noncontroversial, if not terribly satisfying or precise: it's not a JIT if you compile well in advance of any indication the program needs to be run. Whether that lazy-compilation strategy is fine-grained or not isn't clearcut, I believe. I think if you distribute a C program with a bash bootstrapper calling plain old gcc to compile and run the C code only when needed, even gcc might be considered a (coarse-grained, rather rudimentary) JIT in that context.
- kybernetikos 9y agoLike TCCBoot? https://bellard.org/tcc/tccboot.html https://bellard.org/tcc/tccboot.html