3f6a3b5ebe
Lazy compilation has the potential to significantly improve the startup time of a program. While functions have to be codegened when called, it is expected that a significant amount of all code is only required when an error occurs or only when the program is used in certain ways. The basic approach is to first codegen a shim for each function. This shim calls the `__cg_clif_jit` function of cg_clif with a pointer to the `Instance` corresponding to the function for which it is a shim. `__cg_clif_jit` function then codegens this function and uses the hot code swapping support of SimpleJIT to redirect future calls to the function to the real version. Finally it calls the newly codegened function. |
||
---|---|---|
.. | ||
alloc_example.rs | ||
arbitrary_self_types_pointers_and_wrappers.rs | ||
dst-field-align.rs | ||
example.rs | ||
mini_core_hello_world.rs | ||
mini_core.rs | ||
mod_bench.rs | ||
std_example.rs | ||
subslice-patterns-const-eval.rs | ||
track-caller-attribute.rs |