[Patches] [ python-Patches-1145039 ] Remove some invariant
conditions and assert in ceval
SourceForge.net
noreply at sourceforge.net
Sun Feb 20 22:31:32 CET 2005
Patches item #1145039, was opened at 2005-02-20 16:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1145039&group_id=5470
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Remove some invariant conditions and assert in ceval
Initial Comment:
ISTM that if frame->f_exc_type == NULL then exc_value
and exc_traceback will also be NULL. I didn't see that
this is documented, perhaps I missed it or there is
some case when this can occur. If it can occur, we
shoul develop a test for it.
Assuming this condition is invariant, some
simplifications can be made in reset_exc_info which is
called once per eval_frame (on function exit).
Also, I think there is currently an extra Py_INCREF on
Py_None. This occurs when tstate->exc_type == NULL.
This patch seems to have little to no effect on
performance. I did measure a 0.3% speed improvement.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1145039&group_id=5470
More information about the Patches
mailing list