News for hackers. Stuff that matters.
Re:Let's Build a Simple Interpreter, Part 1 (2015) by johncolanduoni on Monday September 12, 2016 @06:23AM (#12478467)
I don't believe it does any runtime optimization, but it does compile code on-demand. Compiled code returns control to the compiler, but not interpreted code since there is none. IIRC this is done in a similar manner to garbage collection pauses (via interception of bad memory accesses).
Re:Let's Build a Simple Interpreter, Part 1 (2015) by exDM69 on Monday September 12, 2016 @06:29AM (#12478492)
If the control returns from the compiled code, I'd call it a JIT.

Do you know why it's doing incremental compilation? Is there something that can't be done ahead of time? E.g. inlining dynamic ("virtual function") calls and then applying optimization?

Re:Let's Build a Simple Interpreter, Part 1 (2015) by johncolanduoni on Monday September 12, 2016 @06:34AM (#12478518)
Mostly to avoid compiling much code that doesn't actually get executed. For the most part you can do everything ahead of time via static analysis (Xamarin's iOS toolchain does this). The only exception is access of code via reflection, which is harder to statically analyze and will also invoke the JIT.