Luke Palmer <[EMAIL PROTECTED]> wrote:

> First, do these work well as pmcs, or should it be integrated with
> PerlArray (I hope not)?

It should subclass PerlArray. I think you don't need LazySequence. You
can just set the exceptions to the lazy sequence in the PerlArray
subclass.
Array/PerlArray can hold values for e.g.:

  @a[0..1000, 1_000_000_000..1_000_001_000]

without growing to 1e9*x bytes.

>  Should Infinity be a pmc?

Probably yes.

> Any ideas on how these things should be set up at the assembly level?
> I was thinking either:

Have a look at the initializer in list.c:list_new_init() or
classes/array.c:init_pmc() and the docs of init_pmc in pdd02.

> Finally, what should things like:

>         set $I0, $P0        # $P0 contains 1..Inf

> Because integer registers can't well store infinity...

Through an exception.

> Thanks,
> Luke

leo

Reply via email to