David Robins wrote:

These all using the 2002-12-02_160000 snapshot.

1. Can't ret early from .subs - looks like the parser sees a ret and figures
   that's the end of the sub.

Yes. Imcc parses and produces code per subroutine, which are delimited by ".sub" and "ret". A proposal was, to change the latter to ".bus" ;-)


2. Most things can only be done in a sub.

Yes


3. It would be nice to have freer naming

Name mangling can take care of this, but the lexer could be improved of course.


4. ret can't immediately follow a label.

This is related to 1).


Resolutions

1. ... (perhaps ".sub" .. ".end"

Yep


Not that I'm trying to slough off fixing these myself and submitting a
patch, but I don't want to step on any toes, and the author is the best
person to declare what's right and implement it.

We (Melvin Smith, Sean O'Rourke, Angel Faus, me) had already a bunch of discussion on these issues + some more: e.g. imcc reserved words (like "if") clash with pasm reserved words, so that you can't really mix the two languages.

One proposal was, to change *all* imcc directives to have a dot in front. There are 2 problems with this: perl6 (P6C) would need a lot of rework (of course doable) and Melvin (the original author) was really not fond of such changes.

Recent work from Jürgen Bömmels ("Use imcc instead of assemble.pl") clearly shows, that imcc could be the future parrot assembler, where the assembler part is only a small subset of imcc features. Register allocation, optimization and running code are the major goodies.

But I will not make any decisions here (beyond the .sub .. .end thingy, which can be done w/o much damage).


Dave

leo

Reply via email to