[Yhc] FInfo->codesize woes.
Tom Shackell
shackell at cs.york.ac.uk
Mon Feb 4 10:07:59 EST 2008
Stewart Platt wrote:
> Thanks for the reply Tom (and in reply to your message, I am modifying
> the interpreter)!
Yes, I think that's probably going to be the easiest way forward, all
the loading code etc is quite fiddly and there's no need to duplicate it :-)
> Aha, seems I threw something of a red herring with the 0x24, it was in
> fact decimal 24.
Ah, I'd wondered if that might be the case :-)
> Judging from my current output (Warning, assembly):
> http://modseven.de/pastebin.php?id=1802
> something went wrong around the NEED_HEAP_32 / UNPACK area.
Indeed, you seem to have lost a few instructions, some of the earlier
ones seem to be out of order as well, though that could be deliberate :-)
Looking at the assembly is interesting, looking good so far. There are
some definite possibilities for optimization such as keeping the stack
pointer in a register, and not using CALL to do MK_AP, NEED_HEAP, EVAL
etc. Though you may well have these things in mind already :-)
One thing to be careful of is RETURN_EVAL, this is because it should
implement tail call optimisation, which can be fiddly. Of course your
example doesn't include any assembly for it, so it might be correct
already :-)
Anyway, good luck, I'll be interested to hear how it goes :-)
Tom
More information about the Yhc
mailing list