Guido van Rossum [Thu, 30 Jan 1997 03:19:41 +0000 (03:19 +0000)]
Added robots.txt support, using Skip Montanaro's parser.
Fixed occasional inclusion of unpicklable objects (Message in errors).
Changed indent of a few messages.
Guido van Rossum [Wed, 29 Jan 1997 16:03:45 +0000 (16:03 +0000)]
Did nobody ever notice that "make test" didn't print the summary line
any more? This was because the *parent* process in test_socket.py did
an os._exit(0)! Getting rid of that now...
Guido van Rossum [Tue, 28 Jan 1997 00:00:11 +0000 (00:00 +0000)]
Changed the lookup algorithm again, based on Reimer Behrends's post.
The table size is now constrained to be a power of two, and we use a
variable increment based on GF(2^n)-{0} (not that I have the faintest
idea what that is :-) which helps avoid the expensive '%' operation.
Some of the entries in the table of polynomials have been modified
according to a post by Tim Peters.
Guido van Rossum [Mon, 27 Jan 1997 21:30:09 +0000 (21:30 +0000)]
Plug a leak with calling something other than a function or method is
called with keyword arguments -- the keyword and value were leaked.
This affected for instance with a __call__() method.
Guido van Rossum [Fri, 24 Jan 1997 13:49:28 +0000 (13:49 +0000)]
Patches for (two forms of) optional dynamic execution profiling --
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.
Guido van Rossum [Fri, 24 Jan 1997 04:19:24 +0000 (04:19 +0000)]
Change the control flow for error handling in the function prelude to
jump to the "Kill locals" section at the end. Add #ifdef macintosh
bandaid to make sure we call sigcheck() on the Mac.
Guido van Rossum [Fri, 24 Jan 1997 04:00:21 +0000 (04:00 +0000)]
When a recycled frame has more local+stack slots than needed,
give the extra slots to the stack rather than than forgetting about
them (this reduces the number of reallocs done).
Guido van Rossum [Fri, 24 Jan 1997 03:43:35 +0000 (03:43 +0000)]
Instead of emitting SET_LINENO instructions, generate a line number
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.
Guido van Rossum [Thu, 23 Jan 1997 23:29:44 +0000 (23:29 +0000)]
Initialize the ob_type field of PyAST_Type dynamically (in
initparser()) instead of statically (in the initializer). The static
initialization, using the address of an object in a different DLL, is
too much for the Microsoft VC++ compiler, and we want to be able to
build this module as a separate DLL (it's nice to have but we don't
want to increase the core DLL's size by 25K). This same trick has
been applied to a number of modules, e.g. NumPy and _tkinter.
Guido van Rossum [Thu, 23 Jan 1997 19:39:29 +0000 (19:39 +0000)]
Forget keeping track of whether a dictionary contains all interned
string keys. Just doing a pointer compare before the string compare
(in fact before the hash compare!) is just as fast.
Guido van Rossum [Wed, 22 Jan 1997 21:00:32 +0000 (21:00 +0000)]
Various notes added:
- -mt option for Solaris threads with Solaris compiler
- make clean when switching static link status for Linux
- DEC alpha --with-dec-threads option
- SunOS removed unnecessary warnings, mention -Xa for SunPro
- Setup.local file
- warn to try make clean after changing readline option
- mention --with-threads as alias for --with-thread
Guido van Rossum [Tue, 21 Jan 1997 21:18:36 +0000 (21:18 +0000)]
Kill all local variables on function return. This closes a gigantic
leak of memory and file descriptors (thanks for Roj for reporting
that!). Alas, the speed goes down by 5%. :-(
Guido van Rossum [Tue, 21 Jan 1997 06:15:24 +0000 (06:15 +0000)]
Only call sigcheck() at the ticker code if we don't have true signals.
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 ;-).
Guido van Rossum [Tue, 21 Jan 1997 06:13:09 +0000 (06:13 +0000)]
Arrange for PyErr_CheckSignals() to be called via Py_AddPendingCall().
This avoids having to call sigcheck() (the same routine by its old
name :-) in the ticker code in ceval.c's main interpreter loop.
Guido van Rossum [Tue, 21 Jan 1997 06:00:33 +0000 (06:00 +0000)]
In the Unix version, arrange for sigcheck() to be called via
Py_AddPendingCall(). This avoids having to call sigcheck() in the
ticker code in ceval.c's main interpreter loop.
Guido van Rossum [Mon, 20 Jan 1997 04:20:52 +0000 (04:20 +0000)]
Changes that appear to give another 12% speedup.
Rather than allocating a list object for the fast locals and another
(extensible one) for the value stack and allocating the block stack
dynamically, allocate the block stack with a fixed size (CO_MAXBLOCKS
from compile.h), and stick the locals and value stack at the end of
the object (this is now possible since the stack size is known
beforehand). Get rid of the owner field and the nvalues argument --
it is available in the code object, like nlocals.
Guido van Rossum [Sat, 18 Jan 1997 08:02:57 +0000 (08:02 +0000)]
Intern all names and varnames in newcodeobject(), plus those string
literals that look like identifiers. Also intern all strings used as
names during the compilation.
Guido van Rossum [Sat, 18 Jan 1997 07:53:23 +0000 (07:53 +0000)]
Two speedup hacks. Caching the hash saves recalculation of a string's
hash value. Interning strings (which requires hash caching) tries to
ensure that only one string object with a given value exists, so
equality tests are one pointer comparison. Together, these can speed
the interpreter up by as much as 20%. Each costs the size of a long
or pointer per string object. In addition, interned strings live
until the end of times. If you are concerned about memory footprint,
simply comment the #define out here (and rebuild everything!).
Guido van Rossum [Fri, 17 Jan 1997 21:04:03 +0000 (21:04 +0000)]
Add co_stacksize field to codeobject structure, and stacksize argument
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).
Guido van Rossum [Fri, 17 Jan 1997 20:59:26 +0000 (20:59 +0000)]
Add co_stacksize field to codeobject structure, and stacksize argument
to PyCode_New() argument list. Also add CO_MAXBLOCKS constant
indicating the maximum static nesting supported by the compiler.
Barry Warsaw [Fri, 17 Jan 1997 00:01:33 +0000 (00:01 +0000)]
(puremodule.c): New module which exports the Purify and Quantify C API
to Python. Minimal documentation is included in comments at the top
of the file, and in the Misc/PURIFY.README file. Note that this
module must be statically linked since Pure doesn't provide shared
stubs libraries.
(Setup.in): Added commented template for pure module
(syslogmodule.c): ins() function wasn't declared static.
Roger E. Masse [Thu, 16 Jan 1997 16:51:57 +0000 (16:51 +0000)]
As per GvR recomendations, remove the restriction that binhex only run on
big-endian machines. This is done by directing the struct module's pack
and unpack methods to treat the data always in bin endian format.
This has been tested on irix (big endian) and solaris x86 (little endian)
but not yet on the mac.
Barry Warsaw [Thu, 16 Jan 1997 16:49:44 +0000 (16:49 +0000)]
set_key(): Use Py_CHARMASK macro to get the character from the array
unsigned. This fixes the 8bit-char-in-key platform incompatibility.
I also removed the old backwards compatibility code, and the commented
lisp rotor code. I retained the lisp docstrings as comments preceding
each function.