On Wed, Apr 30, 2014 at 1:11 PM, Anton Gulenko < [email protected]> wrote:
> I'll try to make the example that Tim mentioned more clear. > Building up the deep stack was done INSIDE the loop. It was also the only > thing that happened inside the loop. > That's why we expected the traces for deep and shallow stacks to be very > similar - shouldn't the optimizer simply eliminate the additional frame > objects? > Also, the relevant fields in the frame objects are indeed marked as > virtualizable in the SPy VM. > The smalltalk code was basically this, with a varying argument to > buildStack: > > buildStack: depth > depth <= 0 ifTrue: [ ^ nil ]. > self buildStack: depth - 1 > > 100000 timesRepeat: [ self buildStack: 100 ] > > Do you have any thoughts regarding this example? > just a wild guess: it might be possible that in this example the trace becomes too long, so tracing aborts and the function is marked as "trace from start"? In that case, the function call cannot be inlined and needs to be turned into a real assembler recursive call, which means that the frame cannot be a virtual because it needs to be passed as an argument.
_______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev
