On Tuesday, Jul 15, 2003, at 06:36 America/New_York, Leopold Toetsch wrote:


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 ;-)

No kidding. How annoyed was I to have sent the message *5 hours* before it showed up on the list, only to come back and find that someone else had started the same thread between the time I sent the message and the time it arrived. ^_^


On the other hand, how odd that both of us would have pretty much the same problem at the pretty much the same time.


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

This seems to work (mostly) after your fix:


% ../../../parrot leo.imc
whee
get_string() not implemented in class 'Continuation'


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)

My previous example works fine after your fix. (without changing either of these issues. the case of the pmc name doesn't appear to matter. and, yes, it prints "whee" once as the cmd_puts sub is compiled, but the lack of compilation was my main problem =-) Apparently in my desire to generate the shortest test case possible, I erred on the side of obfuscation. =-) Please ignore my other response, since your recent patch makes it moot.


In any case, thanks for the quick turnaround. Now I can actually hack on tcl a bit during my lunch today! =-)

(And man, am I not looking forward to your code review when I release that puppy. =-)

Regards.
--
Will "Coke" Coleda will at coleda dot com



Reply via email to