(no subject)

From: Pasha Murat (630)840-8237 FNAL (630)859-3463 home (murat@murat.fnal.gov)
Date: Sun Feb 27 2000 - 20:15:03 MET


hi - this is exactly what I meant by saying that the compiler might need to know 
about the interpreter. When the execution returns from the interpreted code
back to compiled one the compiler may need to restore the context changed by 
the interpreter in which case it needs to know about the guts of the
interpreter. The behaviour can easily be platform-dependent... -best, pasha

Anton Fokin wrote:
> 
> Hi Pasha,
> 
> I have had this solution in mind, but it doesn't look very nice if you are
> going to call this function many times. On the other hand it seems that a
> direct call is possible (ref to TF1, TMinuit). I also has noticed that the
> following doesn work in compiled code. Can you guess why?
> 
> It say "something is found" and crashes then.
> 
> ---
> 
>    gROOT->LoadMacro("test.txt");
> 
>    void (*MyFunc)();
> 
>    MyFunc = (void(*)())gROOT->GetGlobalFunction("Function",0,kTRUE);
>    if (MyFunc) {
>      printf("something is found\n");
>      (*MyFunc)();
>    }
> 
> test.txt ->
> 
> void Function {
>   printf("Hello losers!\n");
> }



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET