Clinton A. Pierce <[EMAIL PROTECTED]> wrote:
> The following code:

>          push_integer() not implemented in class 'PerlHash'

> This is, as far as I can tell, because the same register is used by IMCC
> for both the READDATA and RESTOREINFO locals, thus by the time that the sub
> _data gets around to being run, READDATA has become a PerlHash (imcc -t):

>>PC=0; OP=821 (new_p_ic); ARGS=(P0, 14)
>>PC=3; OP=821 (new_p_ic); ARGS=(P0, 15)

Yep. Good analysis.

You could tell it a bug. Imcc should follow the code path into the
subroutine. But he problem is: the subroutine isn't known, when _main is
compiled. So IMCC only sees one usage of the Array and one usage of the
Hash amd assigns both to the same register P0.

If you want really use such constructs, you can't put them in different
compilation units, because they are basically one unit.

Much better is to implement some kind of calling conventions.

As soon as you pass the READDATA array to the subroutine, it will have
its own register and the problem is gone.

leo

Reply via email to