Dan Sugalski wrote:
At 1:06 AM +0000 2/15/03, "Jürgen" "Bömmels" (via RT) wrote:
I just implemented macro expansion in imcc. This brings us one step closer to substitude assemble.pl
Back in the beginning we decided that, while the assembler would support macros (over some disagreement) since it was an end-user tool and end users might use macros, any internal assembler wouldn't since it was meant to be a quick and simple thing.
imcc *is* the quick assembler :)
$ make testclean
$ time perl t/harness t/[op]*/*.t
real 6m33.287s
$ make testclean
$ IMCC=imcc time perl t/harness t/[op]*/*.t
real 0m28.045s
The internal assembler part of imcc is missing. For sure it could be more modular, so that e.g perl6 links against libimcc and libparrot. But the major problem is, what kind of input should imcc take: some kind of AST (which one), a linearized opcode stream like Instructions* now?
... I'd planned on keeping that, but seeing as how we're going to have languages as complex as perl built in, I'm not sure there's much reason to maintain the disparity.
The internal/external assembler concept is already dead with Juergens patch, IMHO.
imcc passes already *all* tests (except 2 "^@" NUL string tests and 3 .constant macro tests, which is simple to implement - if needed, imcc has a typed .const)
I would like, once this gets to get the macro system fully defined and documented, though.
perldoc assemble.pl is a good starter. leo