- 08 May, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().
-
- 14 Nis, 2001 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
- 21 Mar, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
frees. Note there doesn't seem to be any way to test LocalsToFast(), because the instructions that trigger it are illegal in nested scopes with free variables. Fix allocation strategy for cells that are also formal parameters. Instead of emitting LOAD_FAST / STORE_DEREF pairs for each parameter, have the argument handling code in eval_code2() do the right thing. A side-effect of this change is that cell variables that are also arguments are listed at the front of co_cellvars in the order they appear in the argument list.
-
- 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ı
-
- 03 May, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
-
- 13 Mar, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
Added wrapping macros to dictobject.c, listobject.c, tupleobject.c, frameobject.c, traceback.c that safely prevends core dumps on stack overflow. Macros and functions in object.c, object.h. The method is an "elevator destructor" that turns cascading deletes into tail recursive behavior when some limit is hit.
-
- 20 Ock, 2000 1 kayıt (commit)
-
-
Guido van Rossum yazdı
compilation on NT Alpha. Mostly added casts etc.
-
- 19 Eki, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
the `builtins' initialization fails. Vladimir Marangozov.
-
- 25 Eyl, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
before code has been checked for validity. Discovered by Vladimir Marangozov.
-
- 14 May, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
need to cxall PyErr_Clear() when it returns NULL.
-
- 19 Şub, 1998 1 kayıt (commit)
-
-
Guido van Rossum yazdı
if the globals are the same. Also, when creating a dummy builtins dictionary, add "None" to it, just to be kind.
-
- 31 Eki, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 05 Agu, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
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.
-
- 02 Agu, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-- the thread state is passed in as an argument and the builtins are a member thereof.
-
- 05 May, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
All per-thread globals are moved into a struct which is manipulated separately.
-
- 29 Nis, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 03 Nis, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
all locals to be upped by one when `from <module> import <whatever>' was executed.
-
- 14 Şub, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
from ceval.c). Wrapped a long line.
-
- 24 Ock, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
give the extra slots to the stack rather than than forgetting about them (this reduces the number of reallocs done).
-
- 20 Ock, 1997 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
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.
-
- 18 Ock, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 17 Ock, 1997 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 05 Ara, 1996 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 25 Eki, 1996 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 26 Tem, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 18 Tem, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 04 Nis, 1995 1 kayıt (commit)
-
-
Sjoerd Mullender yazdı
-
- 17 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 10 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-
- 04 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
floatobject.c: fix hash(). methodobject.c: support METH_FREENAME flag bit.
-
- 02 Ock, 1995 1 kayıt (commit)
-
-
Guido van Rossum yazdı
can now be NULL.
-
- 30 Agu, 1994 1 kayıt (commit)
-
-
Guido van Rossum yazdı
-