Author nnorwitz
Recipients nnorwitz, novalis_dt
Date 2008-11-06.07:45:48
SpamBayes Score 3.475e-14
Marked as misclassified No
Message-id <>
Interesting approach.  I was surprised to see the change to the AST, but
I understand why you did it.  I think if the AST optimization approach
works out well, we will want to have some more general mechanism to
communicate these optimization (or other!) hints to the compiler.  It
would suck to have to modify the AST each time we wanted to add a new
optimization.  You and Tom might have better ideas for how best to
achieve that.

I'll make some comments that would need to be addressed, but you might
want to wait making any changes depending on what approach you decide to

The most important missing piece is tests to show that the new code works.

There are various whitespace issues.  Both whitespace only changes that
should be avoided and indentation inconsistencies with the existing code
(or so it appears).  The latter could be the way I'm viewing the file or
existing problems with tabs.

In Python/optimize.c, you need to handle the case where the PyDict_New()
calls fail.  It looks like currently an undetected error can happen in
during construction.  And on destruction it will crash because the
objects will be NULL when calling Py_DECREF.

All calls like PyDict_SetItem(), PyInt_FromLong(), etc need to handle

I'll need to study the code a lot more to see how well it behaves. 
Tests would help a lot with that.
Date User Action Args
2008-11-06 07:45:52nnorwitzsetrecipients: + nnorwitz, novalis_dt
2008-11-06 07:45:52nnorwitzsetmessageid: <>
2008-11-06 07:45:51nnorwitzlinkissue4264 messages
2008-11-06 07:45:48nnorwitzcreate