News for hackers. Stuff that matters.
Re:Ask HN: How does a JIT-compiled function communicate with... by _delirium on Monday October 04, 2010 @06:07PM (#1757692)
Do you have a specific virtual machine in mind, or are you asking for general approaches to the problem? A simple approach is to only JIT function bodies, and deal with all function calls at the VM level. Then all function calls within JITted functions call back into the VM, e.g. by being compiled to some variety of _vm_do_function_call(function, params). Actual VMs include a bunch of other optimizations, of course; which ones are possible depends partly on the language's semantics (e.g. can we assume functions are statically defined, or can they be redefined at runtime?).

There are no comments on this comment yet.