- 08 May, 2009 1 kayıt (commit)
-
-
Jeffrey Yasskin yazdı
Most uses of PyCode_Addr2Line (http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get the line number of a specified frame, but there's no way to do that directly. Forcing people to go through the code object makes them know more about the guts of the interpreter than they should need. The remaining uses of PyCode_Addr2Line seem to be getting the line from a traceback (for example, http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line), which is replaced by the tb_lineno field. So we may be able to deprecate PyCode_Addr2Line entirely for external use.
-
- 14 Şub, 2008 1 kayıt (commit)
-
-
Christian Heimes yazdı
Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation.
-
- 12 Haz, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
at the NeedForSpeed sprint.
-
- 26 May, 2006 1 kayıt (commit)
-
-
Tim Peters yazdı
set_exc_info(), reset_exc_info(): By exploiting the likely (who knows?) invariant that when an exception's `type` is NULL, its `value` and `traceback` are also NULL, save some cycles in heavily-executed code. This is a "a kronar saved is a kronar earned" patch: the speedup isn't reliably measurable, but it obviously does reduce the operation count in the normal (no exception raised) path through PyEval_EvalFrameEx(). The tim-exc_sanity branch tries to push this harder, but is still blowing up (at least in part due to pre-existing subtle bugs that appear to have no other visible consequences!). Not a bugfix candidate.
-
- 23 May, 2006 1 kayıt (commit)
-
-
Richard Jones yazdı
-
- 02 Tem, 2004 1 kayıt (commit)
-
-
Raymond Hettinger yazdı
The builtin eval() function now accepts any mapping for the locals argument. Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing down the normal case. My timings so no measurable impact.
-
- 11 Eyl, 2002 1 kayıt (commit)
-
-
Michael W. Hudson yazdı
This makes things a touch more like 2.2. Read the comments in Python/ceval.c for more details.
-
- 12 Agu, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
Thanks to Skip Montanaro and Kalle Svensson for the patches.
-
- 14 Tem, 2002 1 kayıt (commit)
-
-
Neal Norwitz yazdı
remove unused macros use co alias instead of f->f_code in macros
-
- 29 Agu, 2001 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
- 23 Haz, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
the next free valuestack slot, not to the base (in America, stacks push and pop at the top -- they mutate at the bottom in Australia <winK>). eval_frame(): assert that f_stacktop isn't NULL upon entry. frame_delloc(): avoid ordered pointer comparisons involving f_stacktop when f_stacktop is NULL.
-
- 18 Haz, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
Bugfix candidate in inspect.py: it was referencing "self" outside of a method.
-
- 13 Mar, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
with free variables. Thanks to Martin v. Loewis for finding two of the problems. This fixes SF buf 405583. There is also a C API change: PyFrame_New() is reverting to its pre-2.1 signature. The change introduced by nested scopes was a mistake. XXX Is this okay between beta releases? cell_clear(), the GC helper, must decref its reference to break cycles. frame_dealloc() must dealloc all cell vars and free vars in addition to locals. eval_code2() setup code must INCREF cells it copies out of the closure. The STORE_DEREF opcode implementation must DECREF the object it passes to PyCell_Set().
-
- 29 Ock, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
This change eliminates an extra malloc/free when a frame with free variables is created. Any cell vars or free vars are stored in f_localsplus after the locals and before the stack. eval_code2() fills in the appropriate values after handling initialization of locals. To track the size the frame has an f_size member that tracks the total size of f_localsplus. It used to be implicitly f_nlocals + f_stacksize.
-
- 25 Ock, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
The majority of the changes are in the compiler. The mainloop changes primarily to implement the new opcodes and to pass a function's closure to eval_code2(). Frames and functions got new slots to hold the closure. Include/compile.h Add co_freevars and co_cellvars slots to code objects. Update PyCode_New() to take freevars and cellvars as arguments Include/funcobject.h Add func_closure slot to function objects. Add GetClosure()/SetClosure() functions (and corresponding macros) for getting at the closure. Include/frameobject.h PyFrame_New() now takes a closure. Include/opcode.h Add four new opcodes: MAKE_CLOSURE, LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF. Remove comment about old requirement for opcodes to fit in 7 bits. compile.c Implement changes to code objects for co_freevars and co_cellvars. Modify symbol table to use st_cur_name (string object for the name of the current scope) and st_cur_children (list of nested blocks). Also define st_nested, which might more properly be called st_cur_nested. Add several DEF_XXX flags to track def-use information for free variables. New or modified functions of note: com_make_closure(struct compiling *, PyCodeObject *) Emit LOAD_CLOSURE opcodes as needed to pass cells for free variables into nested scope. com_addop_varname(struct compiling *, int, char *) Emits opcodes for LOAD_DEREF and STORE_DEREF. get_ref_type(struct compiling *, char *name) Return NAME_CLOSURE if ref type is FREE or CELL symtable_load_symbols(struct compiling *) Decides what variables are cell or free based on def-use info. Can now raise SyntaxError if nested scopes are mixed with exec or from blah import *. make_scope_info(PyObject *, PyObject *, int, int) Helper functions for symtable scope stack. symtable_update_free_vars(struct symtable *) After a code block has been analyzed, it must check each of its children for free variables that are not defined in the block. If a variable is free in a child and not defined in the parent, then it is defined by block the enclosing the current one or it is a global. This does the right logic. symtable_add_use() is now a macro for symtable_add_def() symtable_assign(struct symtable *, node *) Use goto instead of for (;;) Fixed bug in symtable where name of keyword argument in function call was treated as assignment in the scope of the call site. Ex: def f(): g(a=2) # a was considered a local of f ceval.c eval_code2() now take one more argument, a closure. Implement LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, MAKE_CLOSURE> Also: When name error occurs for global variable, report that the name was global in the error mesage. Objects/frameobject.c Initialize f_closure to be a tuple containing space for cellvars and freevars. f_closure is NULL if neither are present. Objects/funcobject.c Add support for func_closure. Python/import.c Change the magic number. Python/marshal.c Track changes to code objects.
-
- 01 Eyl, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This should match the situation in the 1.6b1 tree.
-
- 09 Tem, 2000 1 kayıt (commit)
-
-
Fred Drake yazdı
-
- 30 Haz, 2000 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
- 04 Ara, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 05 May, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
All per-thread globals are moved into a struct which is manipulated separately.
-
- 20 Ock, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
See frameobject.c checkin message.
-
- 30 Ara, 1996 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 25 Eki, 1996 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 24 May, 1996 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 18 Tem, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 27 Şub, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 17 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 12 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
-
- 09 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 04 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
object.h: made sizes and refcnts signed ints. stringobject.h: make getstrsize() signed int. methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
-
- 18 Agu, 1994 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 01 Agu, 1994 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 28 Tem, 1993 1 kayıt (commit)
-
-
Guido van Rossum yazdı
* Makefile: change location of FORMS library. * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not) * Almost all .h files: added CPP magic to avoid duplicate inclusions and to support inclusion from C++.
-
- 25 May, 1993 1 kayıt (commit)
-
-
Guido van Rossum yazdı
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.)
-
- 20 May, 1993 1 kayıt (commit)
-
-
Guido van Rossum yazdı
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.
-
- 30 Mar, 1993 1 kayıt (commit)
-
-
Guido van Rossum yazdı
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.
-
- 29 Mar, 1993 1 kayıt (commit)
-
-
Guido van Rossum yazdı
* 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
-
- 18 Eki, 1992 1 kayıt (commit)
-
-
Guido van Rossum yazdı
* 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.)
-
- 05 Nis, 1992 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-