4 ms·
Yes. You can compile arbitrary code at runtime. You can "extract" a function generated with libgccjit as a function pointer and use it in your static code.
by rightbyte 5y ago
Yes. You can compile arbitrary code at runtime. You can "extract" a function generated with libgccjit as a function pointer and use it in your static code.
- chrisseaton 5y agoAnd the great think about this, compared to static code, is you can compile runtime data into this code if you want. So instead of storing something like a configuration value in a global variable which you then have to read, you can store it in the code!