PreviousUpNext

5.5.6  Compile and execute a string containing Mythryl source code

Compile and execute a string containing Mythryl source code:

    eval:  evali "2+2";
    4

This generates optimized native code for the given expression, so it can be a good way of producing on the fly efficient code specialized to the need at hand in cases where runtime needs are too unpredictable to permit compiling all needed code ahead of time. For example, a raytracer might use this to interactively compile efficient native code for the scene being rendered.

To avoid tricky type issues, currently only a handful of eval variants with common return types are supported:


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext