| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
still used?)
|
|
|
|
| |
(fixes #1496539)
|
|
|
|
| |
bug in both: `className` was referenced before being checked for NULL.
|
| |
|
|
|
|
|
| |
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
valid and
invalid file paths for the built-in import machinery which leads to
fewer open calls on startup.
Also fix issue with PEP 302 style import hooks which lead to more open()
calls than necessary.
|
|
|
|
| |
but Trent's copy thinks that it's an anachronism...
|
|
|
|
| |
LOCAL inlining; also added some missing whitespace
|
|
|
|
|
| |
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
|
| |
|
|
|
|
| |
with PyObject_CallFunctionObjArgs, which is 30% faster.
|
|
|
|
|
|
| |
both mystrtoul.c and longobject.c. Share the table instead. Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).
|
|
|
|
| |
statement raise SyntaxError, and add testcase.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In rare cases of strings specifying true values near sys.maxint,
and oddball bases (not decimal or a power of 2), int(string, base)
could deliver insane answers. This repairs all such problems, and
also speeds string->int significantly. On my box, here are %
speedups for decimal strings of various lengths:
length speedup
------ -------
1 12.4%
2 15.7%
3 20.6%
4 28.1%
5 33.2%
6 37.5%
7 41.9%
8 46.3%
9 51.2%
10 19.5%
11 19.9%
12 23.9%
13 23.7%
14 23.3%
15 24.9%
16 25.3%
17 28.3%
18 27.9%
19 35.7%
Note that the difference between 9 and 10 is the difference between
short and long Python ints on a 32-bit box. The patch doesn't
actually do anything to speed conversion to long: the speedup is
due to detecting "unsigned long" overflow more quickly.
This is a bugfix candidate, but it's a non-trivial patch and it
would be painful to separate the "bug fix" from the "speed up" parts.
|
| |
|
|
|
|
| |
"base" parameter.
|
| |
|
|
|
|
|
|
| |
Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
I suppose this could be backported if anyone cares.
|
| |
|
|
|
|
| |
if a continue inside a try failed.
|
|
|
|
|
| |
Change __str__() functions to METH_O.
Change WindowsError__str__ to use PyTuple_Pack.
|
|
|
|
| |
Most of the test_syntax changes are just updating the numbers.
|
|
|
|
|
| |
and the DOS error code in errno. Revert changes where
WindowsError catch blocks unnecessarily special-case OSError.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Warn-raise ImportWarning when importing would have picked up a directory
as package, if only it'd had an __init__.py. This swaps two tests (for
case-ness and __init__-ness), but case-test is not really more expensive,
and it's not in a speed-critical section.
- Test for the new warning by importing a common non-package directory on
sys.path: site-packages
- In regrtest.py, silence warnings generated by the build-environment
because Modules/ (which is added to sys.path for Setup-created modules)
has 'zlib' and '_ctypes' directories without __init__.py's.
|
|
|
|
|
|
|
|
|
| |
MAXPATHLEN-sized buffers for various output-buffers (like to realpath()),
and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and
does not define MAXPATHLEN.) Cursory googling suggests Linux is following a
newer standard than BSD, but in cases like this, who knows. Using the
greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the
most portable solution.
|
| |
|
|
|
|
| |
was having funny effects when called on >2Gb strings ;P
|
|
|
|
|
|
| |
are now macros to exported functions again.
Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
|
| |
|
|
|
|
|
| |
and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions that can't be raised any further, because (for instance) they
occur in __del__ methods. The coroutine tests in test_generators was
triggering this leak. Remove the leakers' testcase, and add a simpler
testcase that explicitly tests this leak to test_generators.
test_generators now no longer leaks at all, on my machine. This fix may also
solve other leaks, but my full refleakhunting run is still busy, so who
knows?
|
|
|
|
|
|
|
|
| |
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
|
| |
|
|
|
|
| |
tp_clear methods.
|
|
|
|
|
| |
arena's "private" list of objects, so there might
be two references to that list.
|
|
|
|
| |
PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
|
|
|
|
|
|
|
|
| |
passing a string. Martin already fixed the actual crash by ensuring
Py_UNICODE is unsigned. As discussed on python-dev, this fix
removes the possibility of creating a unicode string from a raw buffer.
There is an outstanding question of how to fix the crash in 2.4.
|