Leo -- OK. I'll have a look at a single outer .sub ... .end, and implementing subs with regular labels along with the .param stuff.
If .sub ... .end bracket not a subroutine, but a unit of compilation (module?), then shouldn't we make the name reflect the purpose? BTW, what is the difference between .sym and .local? And, .endclass and .endnamespace are not mentioned in imcc/README. Regards, -- Gregor Leopold Toetsch <[EMAIL PROTECTED]> 12/05/2002 12:43 PM To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: Re: Subroutine IMC example with problem [EMAIL PROTECTED] wrote: > Leo -- > * Bracket with one big .sub ... .end, and don't use .sub for my real > subs (yuck -- I want to use .param, .arg, etc for subs and calls) You can use .param/.arg - again: "A .sub/.end delimits a unit of compilation". Look at imcc.y .param => restore, .arg => save that's it (modulo name mangling which you could handle with .namespace). > * Use the anonymous blocks to bracket all non-sub linear code in the > script as I have done (yuck -- results in the problems I've reported) And you cannot jump between them. > * Change the Jako compiler to collect all linear code into a single > segment and emit it at the end, Yep. > I suggest that imcc should allow code outside .sub ... .end > brackets, which should be good for Jako, Perl and other languages. Not needed IMHO. > Regards, > > -- Gregor leo