Guido van Rossum
d031c89891
Marshal the line number table of code objects.
1997-01-24 03:44:17 +00:00
Guido van Rossum
da4eb5c3b5
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.
1997-01-24 03:43:35 +00:00
Guido van Rossum
767579854c
Add co_firstlineno and co_lnotab, for the line number table generated
...
by the compiler (in lieu of SET_LINENO instructions).
1997-01-24 03:41:09 +00:00
Guido van Rossum
f2b2dac5eb
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.
1997-01-23 23:29:44 +00:00
Guido van Rossum
ca756f2a1d
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.
1997-01-23 19:39:29 +00:00
Guido van Rossum
4462e93259
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
1997-01-22 21:00:32 +00:00
Guido van Rossum
ec2f073a9c
The usual
1997-01-22 20:54:01 +00:00
Guido van Rossum
44be35aca4
A number of new symbols have appeared (courtesy autoconf 2.12?)
1997-01-22 20:53:30 +00:00
Guido van Rossum
54d93d446b
Add --with-dec-threads, for DEL Alpha, which requires -threads as the
...
*final* linker argument. This implies --with-thread.
Reimplemented --with-threads as an alias for --with-thread.
1997-01-22 20:51:58 +00:00
Guido van Rossum
e0e696282f
Added PyCObject_Import.
1997-01-22 20:48:48 +00:00
Fred Drake
43d287ad73
(libparser.tex): Fix typo found by Mark Hammond.
1997-01-22 14:25:21 +00:00
Guido van Rossum
c1ef39f795
Bump version to 1.5a1.
1997-01-22 03:46:13 +00:00
Guido van Rossum
f631d13ac7
Bump install version to 1.5.
1997-01-22 03:45:38 +00:00
Guido van Rossum
728a09e0f6
Remove GetOwner, add GetBuildInfo...
1997-01-22 01:41:30 +00:00
Guido van Rossum
4ee5811bd8
Added getbuildinfo.c to the project.
1997-01-22 01:40:35 +00:00
Guido van Rossum
73e122f563
Fix splitext() to go up to the last dot, not the first.
1997-01-22 00:17:26 +00:00
Guido van Rossum
76f587b7f8
Avoid traceback in selection_own_get() when no Tk widget owns the
...
selection; return None instead.
1997-01-21 23:22:03 +00:00
Guido van Rossum
b7cf5bb1c2
Darn. Updated version number for configure.in.
1997-01-21 22:03:53 +00:00
Guido van Rossum
f78abae10f
Let --with-threads be an alias for --with-thread.
1997-01-21 22:02:36 +00:00
Guido van Rossum
a4240132ec
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%. :-(
1997-01-21 21:18:36 +00:00
Guido van Rossum
a04d47b319
Don't use static buffers internally for formatstring().
1997-01-21 16:12:09 +00:00
Guido van Rossum
70d44787a3
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 ;-).
1997-01-21 06:15:24 +00:00
Guido van Rossum
fcdd0e40a4
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.
1997-01-21 06:13:09 +00:00
Guido van Rossum
ad74fa6674
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.
1997-01-21 06:00:33 +00:00
Guido van Rossum
1aa14838d2
Cleanup:
...
- 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
1997-01-21 05:34:20 +00:00
Guido van Rossum
554fa49500
get build info from elsewhere
1997-01-20 18:34:55 +00:00
Guido van Rossum
2fff2e6b05
work build# into version string
1997-01-20 18:34:26 +00:00
Guido van Rossum
3bb63a8dbe
Bugfix: remove ref to fast before it's defined.
1997-01-20 04:29:16 +00:00
Guido van Rossum
768360243a
Changes for frame object speedup:
...
- get fastlocals differently
- call newframeobject() with fewer arguments
- toss getowner(), which was unused anyway
1997-01-20 04:26:20 +00:00
Guido van Rossum
f3e85a0356
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.
This requires small changes in ceval.c only.
1997-01-20 04:20:52 +00:00
Guido van Rossum
cdf578ebaf
New lay-out of frame object, for fewer mallocs.
...
See frameobject.c checkin message.
1997-01-20 04:16:40 +00:00
Guido van Rossum
7eb883a18e
Remove unused variable.
1997-01-18 20:04:05 +00:00
Guido van Rossum
8d75161671
Intern the string "__complex__".
1997-01-18 08:04:16 +00:00
Guido van Rossum
7b89b6a660
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.
1997-01-18 08:02:57 +00:00
Guido van Rossum
a412d24be0
Intern the various string objects created to speed up lookups.
1997-01-18 07:59:12 +00:00
Guido van Rossum
b56933ed2e
Intern the strings "__builtins__".
1997-01-18 07:58:41 +00:00
Guido van Rossum
c6d0670f1b
Intern the strings created in getattr() and setattr().
1997-01-18 07:57:16 +00:00
Guido van Rossum
2a61e7428d
String interning.
1997-01-18 07:55:05 +00:00
Guido van Rossum
ee5cf9b672
Bump API version due to the various speedup hacks.
1997-01-18 07:54:03 +00:00
Guido van Rossum
1e6e9a2368
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!).
1997-01-18 07:53:23 +00:00
Guido van Rossum
3dfd53b4c8
Add "if (x != NULL) continue;" (or similar for err==0) before the
...
break to most cases, as suggested by Tim Peters. This gives another
8-10% speedup.
1997-01-18 02:46:13 +00:00
Guido van Rossum
04f2b453bb
Version 1.1. Fix memory leak and expensive comparison with None.
1997-01-18 02:20:37 +00:00
Guido van Rossum
3e7ae7ab17
Fix the _setmode() patch for MS_WINDOWS: include <fcntl.h> and use
...
fileno(std*).
1997-01-17 22:05:38 +00:00
Guido van Rossum
e3258019c8
Remove obsolete PyFrame_ExtendStack.
1997-01-17 22:03:32 +00:00
Guido van Rossum
3d77d2b10b
Removed accessobject.c from file list.
1997-01-17 21:56:08 +00:00
Guido van Rossum
e9fd28dae5
Add stacksize argument to new.code().
1997-01-17 21:12:06 +00:00
Guido van Rossum
792fd435ec
Comment out extend_stack() -- it is no longer needed.
1997-01-17 21:07:57 +00:00
Guido van Rossum
98a9b312e8
Marshal the new stacksize item in code objects.
1997-01-17 21:07:08 +00:00
Guido van Rossum
7af8130857
Working semaphore implementation by Sjoerd.
1997-01-17 21:06:41 +00:00
Guido van Rossum
dd5db43905
New MAGIC number (code objects have one more item when marshalled).
1997-01-17 21:06:11 +00:00