Patrick R. Michaud via RT wrote:

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'()


Ok, but List is definetely wrong:

.sub "main"
    load_bytecode "perl6.pbc"
    $P0 = get_hll_global "List"
    $P1 = $P0."new"()
    $P2 = clone $P1
.end

$ ../../parrot t3.pir
elements() not implemented in class 'Undef'
current instr.: 'parrot;List;!flatten' pc 2978 (src/gen_builtins.pir:2098)
called from Sub 'parrot;List;iterator' pc 3216 (src/gen_builtins.pir:2225)
called from Sub 'parrot;List;clone' pc 2735 (src/gen_builtins.pir:1944)
called from Sub 'main' pc 14 (t3.pir:5)



--
Bacek.

Reply via email to