summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Since PyDict_GetItem() can't raise an exception any more, there's noGuido van Rossum1998-05-141-4/+1
| | | | need to cxall PyErr_Clear() when it returns NULL.
* Vladimir Marangozov' performance hack: copy f_builtins from ancestorGuido van Rossum1998-02-191-3/+14
| | | | | | | if the globals are the same. Also, when creating a dummy builtins dictionary, add "None" to it, just to be kind.
* Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov)Guido van Rossum1997-10-311-2/+3
|
* Provide a dummy empty directory as f_builtins instead of failing, whenGuido van Rossum1997-08-051-7/+22
| | | | | | | no valid directory is passed in. This prevents __del__ to fail when invoked after __builtins__ has already been discarded. Also add PyFrame_Fini() to discard the cache of frames.
* Avoid function calls to access the current thread state and builtinsGuido van Rossum1997-08-021-4/+2
| | | | | -- the thread state is passed in as an argument and the builtins are a member thereof.
* Massive changes for separate thread state management.Guido van Rossum1997-05-051-2/+13
| | | | | All per-thread globals are moved into a struct which is manipulated separately.
* Quickly renamed.Guido van Rossum1997-04-291-100/+101
|
* Remove a redundant XINCREF(value). This caused the reference count ofGuido van Rossum1997-04-031-1/+0
| | | | | all locals to be upped by one when `from <module> import <whatever>' was executed.
* Kill all local variables when the frame is deallocated (moved hereGuido van Rossum1997-02-141-1/+11
| | | | | | from ceval.c). Wrapped a long line.
* When a recycled frame has more local+stack slots than needed,Guido van Rossum1997-01-241-2/+4
| | | | | give the extra slots to the stack rather than than forgetting about them (this reduces the number of reallocs done).
* Bugfix: remove ref to fast before it's defined.Guido van Rossum1997-01-201-1/+1
|
* Changes that appear to give another 12% speedup.Guido van Rossum1997-01-201-87/+55
| | | | | | | | | | | | 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.
* Intern the strings "__builtins__".Guido van Rossum1997-01-181-1/+1
|
* Comment out extend_stack() -- it is no longer needed.Guido van Rossum1997-01-171-0/+2
|
* Make gcc -Wall happyGuido van Rossum1996-12-051-1/+1
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-12/+19
|
* better policy regarding NULL localsGuido van Rossum1995-07-261-9/+13
|
* changes for keyword arguments and fast function call; added abstract.cGuido van Rossum1995-07-181-40/+62
|
* Use mappinglookup instead of dictlookup for looking up __builtin__.Sjoerd Mullender1995-04-041-1/+7
|
* different init for __builtins__Guido van Rossum1995-01-171-0/+2
|
* add builtins handling and restricted flagGuido van Rossum1995-01-101-2/+14
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | floatobject.c: fix hash(). methodobject.c: support METH_FREENAME flag bit.
* Lots of minor changes. Note for mappingobject.c: the hash table pointerGuido van Rossum1995-01-021-15/+13
| | | | can now be NULL.
* Merge back to main trunkGuido van Rossum1994-08-301-13/+98
|
* * clmodule.c (doParams): free PVbuffer in error condition.Sjoerd Mullender1993-08-031-0/+1
| | | | | * frameobject.c (newframeobject): initialize ob_type if taking entry from the free list, since it is zeroed out when DEBUG is defined.
* * classobject.c: in instance_getattr, don't make a method out of aGuido van Rossum1993-05-251-7/+6
| | | | | | | | | | function found as instance data. * socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite argument parsing in send/recv. * More changes related to access (terminology change: owner instead of class; allow any object as owner; local/global variables are owned by their dictionary, only class/instance data is owned by the class; "from...import *" now only imports objects with public access; etc.)
* Access checks now work, at least for instance data (not for methodsGuido van Rossum1993-05-201-1/+7
| | | | | | | yet). The class is now passed to eval_code and stored in the current frame. It is also stored in instance method objects. An "unbound" instance method is now returned when a function is retrieved through "classname.funcname", which when called passes the class to eval_code.
* * Fixed some subtleties with fastlocals. You can no longer accessGuido van Rossum1993-03-301-1/+1
| | | | | | | | | | | | | | | | | | f_fastlocals in a traceback object (this is a core dump hazard if there are <nil> entries), but instead eval_code() merges the fast locals back into the locals dictionary if it looks like the local variables will be retained. Also, the merge routines save exceptions since this is sometimes needed (alas!). * Added id() to bltinmodule.c, which returns an object's address (identity). Useful to walk arbitrary data structures containing cycles. * Added compile() to bltinmodule.c and compile_string() to pythonrun.[ch]: support to exec/eval arbitrary code objects. The code that defaults globals and locals is moved from run_node in pythonrun.c (which is now identical to eval_node) to eval_code in ceval.c. [XXX For elegance a clean-up session is necessary.]
* Changes to speed up local variables enormously, by avoiding dictionaryGuido van Rossum1993-03-301-0/+6
| | | | | | lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch], pythonrun.c, import.c). The .pyc MAGIC number is changed again. Added get_menu_text to flmodule.
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-2/+2
| | | | | | | | | | | | | | | | | * Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
* * bltinmodule.c: added built-in function cmp(a, b)Guido van Rossum1992-10-181-10/+65
| | | | | | | | | | | | | | | * flmodule.c: added {do,check}_only_forms to fl's list of functions; and don't print a message when an unknown object is returned. * pythonrun.c: catch SIGHUP and SIGTERM to do essential cleanup. * Made jpegmodule.c smaller by using getargs() and mkvalue() consistently. * Increased parser stack size to 500 in parser.h. * Implemented custom allocation of stack frames to frameobject.c and added dynamic stack overflow checks (value stack only) to ceval.c. (There seems to be a bug left: sometimes stack traces don't make sense.)
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* Added f_lasti and f_lineno members.Guido van Rossum1992-01-141-0/+4
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* "Compiling" versionGuido van Rossum1990-12-201-0/+132