Hi,
Thanks for you reply.
> Your observation about bytecode and function to pointer is correct.
> In order to compile test() function, you can try 2 things.
( I have also discovered today the trick with "calling" the function
from the interpreter before it is given to the "compiled" Loop. )
Is it possible to get "thing" 3 in form :
----------------------------------
Int_t ntuple::Loop(Int_t (*p2f)(ntuple *))
{
if (G__isinterpretedp2f(((void *)p2f) == G__INTERPRETEDFUNC) {
...
HERE COME SOME MAGIC LINES WHICH BYTE-COMPILE THE p2f
...
}
switch(G__isinterpretedp2f(((void *)p2f)) {
...
}
}
----------------------------------
So, the first thing the "compiled" Loop does is, it checks if the p2f
function is INTERPRETEDFUNC, and if yes, it byte-compiles it.
Then it proceeds to the "switch", and it finds ( the second call to
the G__isinterpretedp2f ) that the p2f is BYTECODEFUNC.
If this is possible ( and easy, don't spend the whole day on it ), could
you, please, "fill" the place marked "HERE COME SOME MAGIC LINES WHICH
BYTE-COMPILE THE p2f" ?
Thanks in advance,
Jacek.
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:33 MET