At 12:34 PM +0100 3/23/04, Leopold Toetsch wrote:
I've stripped down the whole stack code to use one item per chunk. It passes all tests (3 disabled that push infintely and check for CHECK_LIMIT and t/pmc/eval_6 which is borken).

From reading this patch, either something's horribly wrong here or the stack code's mutated beyond all recognition since the last time I looked. For this to be reasonable we need:


1) A stack chunk freelist, akin to the PMC and buffer freelists
2) The stack entry has to look something like:

   struct {
     struct IntStackFrame *prev;
     INTVAL Registers[REGSPERFRAME];
   } IntStackFrame;

It could be a union of INTVAL, NUMVAL, STRING *, and PMC * if we don't want to maintain several free lists. Throwing a flag word in there's probably not out of order either.

The indirection through the Buffer stuff has to go (the two indirections are a waste, and we certainly don't need this stuff shifted around by the GC) and skipping the allocation of the memory for the frame is needed. (Parrot_allocate really ought not ever be called for these fixed-sized structures, it's a huge waste)
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to