On Sun, Sep 07, 2008 at 06:33:49AM -0700, Vasily Chekalkin wrote:
> Hello.
>
> By default Range (and probably many other classes) constructed in
> non-consistent state.
>
> Minimal example:
> .namespace
> .sub 'main'
> load_bytecode "perl6.pbc"
> $P0 = new 'Range'
> $P1 = clone $P0
> say "done"
> .end
For Rakudo and other PCT-related items we should generally not
be using the 'new' opcode to create objects. The correct
approach is
## $P1 = Range.new;
$P0 = get_hll_global 'Range'
$P1 = $P0.'new'()
Pm