Neal Norwitz
245ce8db46
i and j are initialized below when used. No need to do it twice
2006-06-12 02:16:10 +00:00
Neal Norwitz
b9845e72f9
Get rid of f_restricted too. Doc the other 4 ints that were already removed
...
at the NeedForSpeed sprint.
2006-06-12 02:11:18 +00:00
Martin v. Löwis
0e8bd7e1cc
Patch #1495999 : Part two of Windows CE changes.
...
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Armin Rigo
35f6d36951
[ 1497053 ] Let dicts propagate the exceptions in user __eq__().
...
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
2006-06-01 13:19:12 +00:00
Fredrik Lundh
7a83089c06
needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in-
...
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
2006-05-27 10:39:48 +00:00
Tim Peters
7df5e7f4b2
Patch 1145039.
...
set_exc_info(), reset_exc_info(): By exploiting the
likely (who knows?) invariant that when an exception's
`type` is NULL, its `value` and `traceback` are also NULL,
save some cycles in heavily-executed code.
This is a "a kronar saved is a kronar earned" patch: the
speedup isn't reliably measurable, but it obviously does
reduce the operation count in the normal (no exception
raised) path through PyEval_EvalFrameEx().
The tim-exc_sanity branch tries to push this harder, but
is still blowing up (at least in part due to pre-existing
subtle bugs that appear to have no other visible
consequences!).
Not a bugfix candidate.
2006-05-26 23:14:37 +00:00
Fredrik Lundh
1b94940165
Py_LOCAL shouldn't be used for data; it works for some .NET 2003 compilers,
...
but Trent's copy thinks that it's an anachronism...
2006-05-26 12:01:49 +00:00
Fredrik Lundh
57640f5c57
needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"
...
LOCAL inlining; also added some missing whitespace
2006-05-26 11:54:04 +00:00
Fredrik Lundh
b8b3c8e276
needforspeed: added Py_LOCAL macro, based on the LOCAL macro used
...
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
2006-05-26 11:29:39 +00:00
Georg Brandl
684fd0c8ec
Replace PyObject_CallFunction calls with only object args
...
with PyObject_CallFunctionObjArgs, which is 30% faster.
2006-05-25 19:15:31 +00:00
Richard Jones
cebbefc98d
Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects.
2006-05-23 18:28:17 +00:00
Neal Norwitz
02104df4c8
Fix #132 from Coverity, retval could have been derefed
...
if a continue inside a try failed.
2006-05-19 06:31:23 +00:00
Neal Norwitz
b255069d43
Micro optimization. In the first case, we know that frame->f_exc_type
...
is NULL, so there's no reason to do anything with it. In the second case,
we know frame->f_exc_type is not NULL, so we can just do an INCREF.
2006-05-09 05:38:56 +00:00
Martin v. Löwis
6685128b97
Fix more ssize_t issues.
2006-04-22 11:40:03 +00:00
Thomas Wouters
79cdce35de
Teach Python/ceval.c's inlining of 'str += str' about Py_ssize_t sizes; this
...
was having funny effects when called on >2Gb strings ;P
2006-04-19 15:09:44 +00:00
Jeremy Hylton
a4ebc135ac
Refactor: Move code that uses co_lnotab from ceval to codeobject
2006-04-18 14:47:00 +00:00
Anthony Baxter
a863d334aa
low-hanging fruit in Python/ - g++ still hates all the enum_kind declarations
...
in Python/Python-ast.c. Not sure what to do about those.
2006-04-11 07:43:46 +00:00
Phillip J. Eby
2ba96610bf
SF Patch #1463867 : Improved generator finalization to allow generators
...
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
2006-04-10 17:51:05 +00:00
Armin Rigo
d34fa52a06
answer a question from a comment
2006-03-28 19:10:40 +00:00
Neal Norwitz
90768424f8
Fix a ssize_t issue
2006-03-23 05:48:09 +00:00
Guido van Rossum
f669436189
Um, I thought I'd already checked this in.
...
Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
2006-03-10 02:28:35 +00:00
Guido van Rossum
38fff8c4e4
Checking in the code for PEP 357.
...
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
2006-03-07 18:50:55 +00:00
Hye-Shik Chang
4af5c8cee4
SF #1444030 : Fix several potential defects found by Coverity.
...
(reviewed by Neal Norwitz)
2006-03-07 15:39:21 +00:00
Neal Norwitz
814e938d08
Use Py_ssize_t since we are working with list size below
2006-03-02 07:54:28 +00:00
Thomas Wouters
7f59732716
Put back the essence of Jeremy's original XXX comment.
2006-03-01 05:32:33 +00:00