On Mon, Oct 20, 2008 at 6:18 PM, chromatic <[EMAIL PROTECTED]> wrote:

> 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


Let's wait with it. It has been like this for ages, but I only recently
actually tested it. The comments indicating it's dangerous have been there
for a while.

For now, Just Don't Do It (writing :immediate subs that load_bytecode).

kjs

Reply via email to