| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Print correct name in fatal error from PyErr_Print.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
2. Fix two bugs in complex():
- Memory leak when using complex(classinstance) -- r was never
DECREF'ed.
- Conversion of the second argument, if not complex, was done using
the type vector of the 1st.
|
| |
|
|
|
|
|
| |
Add prototypes for parsestr() and parsestrplus() (unrelated, but
seemed to make sense.)
|
|
|
|
| |
errors in initializing the dictionary.
|
|
|
|
|
|
|
|
|
|
|
| |
recognized by the code generator and code generation for the test and
the subsequent suite is suppressed.
One must write *exactly* ``if __debug__:'' or ``elif __debug__:'' --
no parentheses or operators must be present, or the optimization is
not carried through. Whitespace doesn't matter. Other uses of
__debug__ will find __debug__ defined as 0 or 1 in the __builtin__
module.
|
| |
|
| |
|
|
|
|
| |
it anyway.
|
|
|
|
| |
nonzero.
|
|
|
|
|
| |
New file pyfpe.c and exception FloatingPointError.
Surround some f.p. operations with PyFPE macro brackets.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Py_FdIsInteractive(). The flag is supposed to be set by the -i
command line option. The function is supposed to be called instead of
isatty(). This is used for Lee Busby's wish #1, to have an option
that pretends stdin is interactive even when it really isn't.
|
| |
|
|
|
|
|
|
|
|
| |
by the frameobject dealloc when it is time for the locals to go. When
there's still a traceback object referencing this stack frame, we
don't want the local variables to disappear yet.
(Hmm... Shouldn't they be copied to the f_locals dictionary?)
|
| |
|
|
|
|
|
|
|
|
|
| |
- Use co->... instead of f->f_code->...; save an extra lookup of what
we already have in a local variable).
- Remove test for nlocals > 0 before setting fastlocals to
f->f_localsplus; 0 is a rare case and the assignment is safe even
then.
|
|
|
|
|
|
|
| |
called with keyword arguments -- the keyword and value were leaked.
This affected for instance with a __call__() method.
Bug reported and fix supplied by Jim Fulton.
|
|
|
|
|
|
| |
i.e., counting opcode frequencies, or (with DXPAIRS defined) opcode
pair frequencies. Define DYNAMIC_EXECUTION_PROFILE on the command
line (for this file and for sysmodule.c) to enable.
|
|
|
|
|
| |
jump to the "Kill locals" section at the end. Add #ifdef macintosh
bandaid to make sure we call sigcheck() on the Mac.
|
|
|
|
| |
in ceval.c).
|
|
|
|
| |
tb_lineno. Store it in tb_lineno for the user.
|
| |
|
| |
|
|
|
|
|
|
| |
table which is incorporated in the code object. This way, the runtime
overhead to keep track of line numbers is only incurred when an
exception has to be reported.
|
|
|
|
|
| |
leak of memory and file descriptors (thanks for Roj for reporting
that!). Alas, the speed goes down by 5%. :-(
|
|
|
|
|
|
|
| |
This is safe now that both intrcheck() and signalmodule.c schedule a
sigcheck() call via Py_AddPendingCall().
This gives another 7% speedup (never run such a test twice ;-).
|
|
|
|
|
|
|
|
|
|
| |
- fix bug in Py_MakePendingCalls() with threading
- fix return type of do_raise
- remove build_slice (same as PySlice_New)
- remove code inside #if 0
- remove code inside #ifdef CHECK_STACK
- remove code inside #ifdef SUPPORT_OBSOLETE_ACCESS
- comment about newimp.py should refer to ni.py
|
| |
|
|
|
|
|
|
| |
- get fastlocals differently
- call newframeobject() with fewer arguments
- toss getowner(), which was unused anyway
|
| |
|
| |
|
|
|
|
|
| |
literals that look like identifiers. Also intern all strings used as
names during the compilation.
|
|
|
|
|
| |
break to most cases, as suggested by Tim Peters. This gives another
8-10% speedup.
|
| |
|
| |
|
| |
|
|
|
|
| |
from compile.h. Remove all eval stack overflow checks.
|
|
|
|
|
|
|
|
|
|
|
|
| |
to PyCode_New() argument list. Move MAXBLOCKS constant to conpile.h.
Added accurate calculation of the actual stack size needed by the
generated code.
Also commented out all fprintf statements (except for a new one to
diagnose stack underflow, and one in #ifdef'ed out code), and added
some new TO DO suggestions (now that the stacksize is taken of the TO
DO list).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The raise logic has one additional feature: if you raise <class>,
<value> where <value> is not an instance, it will construct an
instance using <value> as argument. If <value> is None, <class> is
instantiated without arguments. If <value> is a tuple, it is used as
the argument list.
This feature is intended to make it easier to upgrade code from using
string exceptions to using class exceptions; without this feature,
you'd have to change every raise statement from ``raise X'' to ``raise
X()'' and from ``raise X, y'' to ``raise X(y)''. The latter is still
the recommended form (because it has no ambiguities about the number
of arguments), but this change makes the transition less painful.
|
|
|
|
| |
Tested with AMK's help.
|
| |
|
| |
|
| |
|