Hi,

Dag Sverre Seljebotn wrote:
> *And*, if that is done, there might be a lot of monotone but crucial 
> work (tear it down and build it up), so we better have a coordinated 
> coding session with IRC chat. I can put in two or three hours tomorrow.

It will certainly take longer. I actually don't think there is any good
default here that ExprNode() could implement, as it now depends on the
subexpression *if* a temp is needed and on the node itself *when* it needs
to be allocated and deallocated.

We'll basically have to re-implement the entire flow that is there inside
the analyse_expressions() methods, but move it to the code generation. It
will be easier than doing these things in analyse_expressions(), but it
certainly needs time to get it right again.

Above all, the infrastructure must be at least somewhat clear before hand.
Otherwise, we'll end up doing everything over and over again.


> I am a bit scared of the prospect of implementing my own proposal 
> though. Before changing the entire flow we need to schedule developer 
> time so it doesn't get out of hand (Robert has some scary stories to 
> tell about the SAGE "coercion" remake :-) arguably this change is 
> isolated to 4000 lines in ExprNodes.py).

+ another couple of hundred lines in Nodes.py, e.g. for the ForInStatNode
that started this.


> The drawback with my proposal is that it doesn't seem easy to be 
> backwards compatible, it needs tearing out and rebuilding stuff. Then 
> again, without all the restrictions that are there on the current temp 
> system (i.e. must allocate during analysis, trying to reuse temps in 
> ways that should be much easier in a parent-manages-temp scheme) the 
> problem seems to become a lot smaller than the problem the current 
> complicated code has to solve.

It's absolutely worth it, and it must be done completely. Stopping half-way
means breaking everything.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to