Re:Firefox’s new streaming and tiering compiler
by rcthompson on Wednesday January 17, 2018 @02:54PM
(#16171184)
> 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?
Re:Firefox’s new streaming and tiering compiler
by chrisseaton on Wednesday January 17, 2018 @02:58PM
(#16171216)
No 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.
Re:Firefox’s new streaming and tiering compiler
by rcthompson on Wednesday January 17, 2018 @03:06PM
(#16171293)
Ok, 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.
Re:Firefox’s new streaming and tiering compiler
by emn13 on Wednesday January 17, 2018 @04:42PM
(#16172202)
Well, 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.
Re:Firefox’s new streaming and tiering compiler
by kybernetikos on Wednesday January 17, 2018 @05:24PM
(#16172605)
Like TCCBoot? https://bellard.org/tcc/tccboot.html
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.