On Sunday 19 October 2008 14:02:58 Klaas-Jan Stol wrote:

> when running code as this:
> .sub main :immediate
>   load_bytecode "foo.pir"
> .end
>
> (assuming you have a file 'foo.pir'), IMCC can't handle this.
>
> This is because in pbc.c, a global structure called 'globals' is used to
> allow the different functions to share access to some data (in particular,
> the code segment stuff).
>
> As documented by a warning in imcc's sources, a load_bytecode will trigger
> a (nested) compilation phase, which will overwrite this data.
>
> Parrot won't output anything (windows) , possibly segfaulting.
>
> The fix would be to store this 'globals' structure in the imcc_info
> structure (I think).

That analysis sounds right to me as well.  Is it affecting any language at the 
moment?  As much as I hate modifying IMCC before a release, I wonder if it's 
a valuable fix.

-- c

Reply via email to