summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Allow passing a .pyo file.Guido van Rossum1997-04-021-5/+8
| | | | Print correct name in fatal error from PyErr_Print.
* Added assert statement.Guido van Rossum1997-04-021-0/+45
|
* Added assert grammar.Guido van Rossum1997-04-021-494/+522
|
* 1. Add string conversions to int(), long(), float(). (Not to complex()!)Guido van Rossum1997-03-311-7/+127
| | | | | | | | | | 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.
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-143-6/+6
|
* Fix dumb bug calling parsestrplus with wrong node as argument.Guido van Rossum1997-03-111-1/+3
| | | | | Add prototypes for parsestr() and parsestrplus() (unrelated, but seemed to make sense.)
* Define __debug__ as 0 if -O is given, 1 otherwise. Also test forGuido van Rossum1997-03-111-0/+4
| | | | errors in initializing the dictionary.
* Added support for ``if __debug__:'' -- if -O is given, this form isGuido van Rossum1997-03-111-2/+90
| | | | | | | | | | | 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.
* When -O is given, use ".pyo" instead of ".pyc".Guido van Rossum1997-03-111-1/+9
|
* Clarify error message for unexpected keyword parameter.Guido van Rossum1997-03-101-1/+4
|
* Greatly renamed. Not a very thorough job -- I'm going to restructureGuido van Rossum1997-03-051-210/+211
| | | | it anyway.
* Add global Py_OptimizeFlag. SET_LINENO is omitted again unless this isGuido van Rossum1997-03-031-4/+7
| | | | nonzero.
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-145-4/+38
| | | | | New file pyfpe.c and exception FloatingPointError. Surround some f.p. operations with PyFPE macro brackets.
* Keep gcc -Wall happy.Guido van Rossum1997-02-141-1/+1
|
* Oops, remove an unused variable from PyErr_Format().Guido van Rossum1997-02-141-1/+0
|
* Added new global flag variable Py_InteractiveFlag and new functionGuido van Rossum1997-02-141-1/+22
| | | | | | | 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.
* Added convenience function PyErr_Format(exception, formatstring, ...) -> NULL.Guido van Rossum1997-02-141-0/+27
|
* *Don't* kill all local variables on function exit. This will be doneGuido van Rossum1997-02-141-12/+0
| | | | | | | | 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?)
* Added intern() function.Guido van Rossum1997-02-141-0/+14
|
* Two small changes:Guido van Rossum1997-01-271-5/+3
| | | | | | | | | - 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.
* Plug a leak with calling something other than a function or method isGuido van Rossum1997-01-271-4/+3
| | | | | | | 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.
* Patches for (two forms of) optional dynamic execution profiling --Guido van Rossum1997-01-241-0/+68
| | | | | | 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.
* Change the control flow for error handling in the function prelude toGuido van Rossum1997-01-241-23/+17
| | | | | jump to the "Kill locals" section at the end. Add #ifdef macintosh bandaid to make sure we call sigcheck() on the Mac.
* Added optional interface for dynamic execution profile (to be gatheredGuido van Rossum1997-01-241-2/+11
| | | | in ceval.c).
* Get the line number from PyCode_Addr2Line instead of believingGuido van Rossum1997-01-241-1/+4
| | | | tb_lineno. Store it in tb_lineno for the user.
* New magin number (because of linenumber table).Guido van Rossum1997-01-241-1/+1
|
* Marshal the line number table of code objects.Guido van Rossum1997-01-241-1/+9
|
* Instead of emitting SET_LINENO instructions, generate a line numberGuido van Rossum1997-01-241-6/+102
| | | | | | 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.
* Kill all local variables on function return. This closes a giganticGuido van Rossum1997-01-211-0/+12
| | | | | leak of memory and file descriptors (thanks for Roj for reporting that!). Alas, the speed goes down by 5%. :-(
* Only call sigcheck() at the ticker code if we don't have true signals.Guido van Rossum1997-01-211-2/+6
| | | | | | | 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 ;-).
* Cleanup:Guido van Rossum1997-01-211-222/+10
| | | | | | | | | | - 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 build info from elsewhereGuido van Rossum1997-01-201-9/+2
|
* Changes for frame object speedup:Guido van Rossum1997-01-201-14/+2
| | | | | | - get fastlocals differently - call newframeobject() with fewer arguments - toss getowner(), which was unused anyway
* Remove unused variable.Guido van Rossum1997-01-181-1/+0
|
* Intern the string "__complex__".Guido van Rossum1997-01-181-1/+1
|
* Intern all names and varnames in newcodeobject(), plus those stringGuido van Rossum1997-01-181-7/+22
| | | | | literals that look like identifiers. Also intern all strings used as names during the compilation.
* Add "if (x != NULL) continue;" (or similar for err==0) before theGuido van Rossum1997-01-181-18/+60
| | | | | break to most cases, as suggested by Tim Peters. This gives another 8-10% speedup.
* Marshal the new stacksize item in code objects.Guido van Rossum1997-01-171-1/+3
|
* Working semaphore implementation by Sjoerd.Guido van Rossum1997-01-171-3/+64
|
* New MAGIC number (code objects have one more item when marshalled).Guido van Rossum1997-01-171-1/+2
|
* Use the stack size from the code object and the CO_MAXBLOCKS constantGuido van Rossum1997-01-171-2/+10
| | | | from compile.h. Remove all eval stack overflow checks.
* Add co_stacksize field to codeobject structure, and stacksize argumentGuido van Rossum1997-01-171-62/+253
| | | | | | | | | | | | 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).
* Check for duplicate keyword arguments at compile time.Guido van Rossum1997-01-061-12/+20
|
* Make builtin_module_names a tuple instead of a list.Guido van Rossum1997-01-061-0/+5
|
* Rename DEBUG macro to Py_DEBUGGuido van Rossum1996-12-303-9/+9
|
* Moved the raise logic out of the main interpreter loop to a separate function.Guido van Rossum1996-12-101-60/+127
| | | | | | | | | | | | | | | 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.
* Better way to handle 64-bit ints, keeping gcc -Wall happy.Guido van Rossum1996-12-101-30/+18
| | | | Tested with AMK's help.
* Add unistd.h to make gcc -Wall happy.Guido van Rossum1996-12-101-0/+4
|
* Add const to error and newstring functionsGuido van Rossum1996-12-101-1/+1
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-056-28/+38
|