1) First automated mexing will be done by the user if he/she really wants by
calling function so the idea of just in time is absent.
2) What i was thinking is sth like:
- Parse file and find loops (and to make it easy) that do not call any
functions!
- analyze <for> blocks
- based on gathered info write mex functions with proper arguments
(iterators, vectors, matrices) that implement the same loops.
- system("mex myfunc.mex")
- make new function file with loops replaced by function calls to mex
functions.
I m not 100% sure but this sounds much easier than embedding JIT. So we just replace loops with function calls.