<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects, branch v2.1a2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects?h=v2.1a2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects?h=v2.1a2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-02-01T23:53:05Z</updated>
<entry>
<title>SF patch 103543 from tg@freebsd.org:</title>
<updated>2001-02-01T23:53:05Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-02-01T23:53:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2492a20579ab1b395d2d3a65b2f9922eb86f9021'/>
<id>urn:sha1:2492a20579ab1b395d2d3a65b2f9922eb86f9021</id>
<content type='text'>
PyFPE_END_PROTECT() was called on undefined var
</content>
</entry>
<entry>
<title>PEP 205, Weak References -- initial checkin.</title>
<updated>2001-02-01T05:27:45Z</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2001-02-01T05:27:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=41deb1efc2f969b58e49af669cc20d15ccdb04c6'/>
<id>urn:sha1:41deb1efc2f969b58e49af669cc20d15ccdb04c6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename dubiously named local variable 'cmpfunc' -- this is also a</title>
<updated>2001-01-29T23:50:25Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-01-29T23:50:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3202c6fac875615efae017c6f6219a498f6fc90e'/>
<id>urn:sha1:3202c6fac875615efae017c6f6219a498f6fc90e</id>
<content type='text'>
typedef, and at least one compiler choked on this.

(SF patch #103457, by bquinlan)
</content>
</entry>
<entry>
<title>Remove f_closure slot of frameobject and use f_localsplus instead.</title>
<updated>2001-01-29T22:51:52Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-01-29T22:51:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2b724da8d9cd0c41a51e798eca75018ce155e997'/>
<id>urn:sha1:2b724da8d9cd0c41a51e798eca75018ce155e997</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>fix indentation glitch</title>
<updated>2001-01-29T22:38:32Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-01-29T22:38:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=09ac89ae78a4977af6eda4b0e0c396f577220bd2'/>
<id>urn:sha1:09ac89ae78a4977af6eda4b0e0c396f577220bd2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed .capitalize() method of Unicode objects to work like the</title>
<updated>2001-01-29T11:14:16Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-29T11:14:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fde66e1bcc4431a59f36bad0ca0dd7a848ce794b'/>
<id>urn:sha1:fde66e1bcc4431a59f36bad0ca0dd7a848ce794b</id>
<content type='text'>
corresponding string method. Added tests for this too.

Patch written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
</content>
</entry>
<entry>
<title>The one thing I love more then writing code is deleting code.</title>
<updated>2001-01-29T06:21:17Z</updated>
<author>
<name>Moshe Zadka</name>
<email>moshez@math.huji.ac.il</email>
</author>
<published>2001-01-29T06:21:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=497671e094b7f18221cc1f872bfe68afc57c860b'/>
<id>urn:sha1:497671e094b7f18221cc1f872bfe68afc57c860b</id>
<content type='text'>
* Removed func_hash and func_compare, so they can be treated as immutable
  content-less objects (address hash and comparison)
* Added tests to that affect to test_funcattrs (also testing func_code
  is writable)
* Reverse meaning of tests in test_opcodes which checked identical code
  gets identical functions
</content>
</entry>
<entry>
<title>Re-factored PyInstance_New() into PyInstance_New() and PyInstance_NewRaw().</title>
<updated>2001-01-28T03:53:08Z</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2001-01-28T03:53:08Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5cc2c8c3c8d9809c45fee8d638dae431b56e773d'/>
<id>urn:sha1:5cc2c8c3c8d9809c45fee8d638dae431b56e773d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>PEP 227 implementation</title>
<updated>2001-01-25T20:06:59Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-01-25T20:06:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=64949cb753f206c0ca1d83f55d07afd3c179b81a'/>
<id>urn:sha1:64949cb753f206c0ca1d83f55d07afd3c179b81a</id>
<content type='text'>
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&gt;

    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.
</content>
</entry>
<entry>
<title>PEP 227 implementation</title>
<updated>2001-01-25T20:04:14Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-01-25T20:04:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fbd849f201a4a8c17745a72eb9f0ee3bae34d330'/>
<id>urn:sha1:fbd849f201a4a8c17745a72eb9f0ee3bae34d330</id>
<content type='text'>
A cell contains a reference to a single PyObject.  It could be
implemented as a mutable, one-element sequence, but the separate type
has less overhead.
</content>
</entry>
</feed>
