Will Coleda <[EMAIL PROTECTED]> wrote:
> Given the following example:

> % cat test.imc
> .sub _MAIN
>    .local sub command_sub
>    newsub command_sub, .Sub, __cmd_puts
> .end
> .sub __cmd_puts
>    print "whee\n"
> .end
> %../../../parrot -o test.pbc test.imc
> error:imcc:store_labels: inter_cs label '__cmd_puts' not found
> make: *** [test.pbc] Error 1

> I presume I'm missing something obvious?

Yep, a thread started by Luke Palmer a minute ago ;-)

And:

 .sub _MAIN
    .local Sub command_sub
    $P0 = new PerlString
    $P0 ="back\n"
    $P1 = new PerlString
    $P1 ="again\n"
    newsub command_sub, .Sub, __cmd_puts
    invokecc command_sub
    # $P0 = P1 is globbered above
    print $P0
    print $P1
    end
 .end
 .sub __cmd_puts
    print "whee\n"
    invoke P1
 .end

imcc doesn't currently know about calling convetions and side effects of
e.g. invokecc.

(Please also note the "Sub" in .local and the "end" op)

leo

Reply via email to