<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Include/opcode.h, branch 2.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/opcode.h?h=2.1</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/opcode.h?h=2.1'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-02-01T22:48:12Z</updated>
<entry>
<title>Allow 'continue' inside 'try' clause</title>
<updated>2001-02-01T22:48:12Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-02-01T22:48:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3faa52ecc4aeb30f8913b4dd105184f6f7bc733d'/>
<id>urn:sha1:3faa52ecc4aeb30f8913b4dd105184f6f7bc733d</id>
<content type='text'>
SF patch 102989 by Thomas Wouters
</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>Rich comparisons: ensure that LT == Py_LT, etc.</title>
<updated>2001-01-17T15:21:09Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-01-17T15:21:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c219d55bd02b6b21de088de357b0761a3d1a7ac2'/>
<id>urn:sha1:c219d55bd02b6b21de088de357b0761a3d1a7ac2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>REMOVED all CWI, CNRI and BeOpen copyright markings.</title>
<updated>2000-09-01T23:29:29Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2000-09-01T23:29:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8586991099e4ace18ee94163a96b8ea1bed77ebe'/>
<id>urn:sha1:8586991099e4ace18ee94163a96b8ea1bed77ebe</id>
<content type='text'>
This should match the situation in the 1.6b1 tree.
</content>
</entry>
<entry>
<title>The real suport for augmented assignment: new opcodes, new PyNumber and</title>
<updated>2000-08-24T20:09:45Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2000-08-24T20:09:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=dd8dbdb7172fbafb5ffab8600e620103fc19879e'/>
<id>urn:sha1:dd8dbdb7172fbafb5ffab8600e620103fc19879e</id>
<content type='text'>
PySequence methods and functions, new tokens.
</content>
</entry>
<entry>
<title>Charles G. Waldman &lt;cgw@fnal.gov&gt;:</title>
<updated>2000-08-24T00:32:09Z</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2000-08-24T00:32:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d'/>
<id>urn:sha1:ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d</id>
<content type='text'>
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit.  This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.

This closes the implementation portion of SourceForge patch #100893.
</content>
</entry>
<entry>
<title>PEP 214, Extended print Statement, has been accepted by the BDFL.</title>
<updated>2000-08-21T15:36:27Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2000-08-21T15:36:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=35fd665981e1eb5a1ba3c88c17e5538178047532'/>
<id>urn:sha1:35fd665981e1eb5a1ba3c88c17e5538178047532</id>
<content type='text'>
This adds the two new opcodes to support this feature: PRINT_ITEM_TO,
PRINT_NEWLINE_TO.
</content>
</entry>
<entry>
<title>Apply SF patch #101135, adding 'import module as m' and 'from module import</title>
<updated>2000-08-17T22:55:00Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2000-08-17T22:55:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5215225ea1e3200b572775639d567f5e3f489a15'/>
<id>urn:sha1:5215225ea1e3200b572775639d567f5e3f489a15</id>
<content type='text'>
name as n'. By doing some twists and turns, "as" is not a reserved word.

There is a slight change in semantics for 'from module import name' (it will
now honour the 'global' keyword) but only in cases that are explicitly
undocumented.
</content>
</entry>
<entry>
<title>Merge UNPACK_LIST and UNPACK_TUPLE into a single UNPACK_SEQUENCE, since they</title>
<updated>2000-08-11T22:15:52Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2000-08-11T22:15:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0be5aab04d2f441323e8a7681f79137d26fd2e30'/>
<id>urn:sha1:0be5aab04d2f441323e8a7681f79137d26fd2e30</id>
<content type='text'>
did the same anyway.

I'm not sure what to do with Tools/compiler/compiler/* -- that isn't part of
distutils, is it ? Should it try to be compatible with old bytecode version ?
</content>
</entry>
<entry>
<title>Change copyright notice - 2nd try.</title>
<updated>2000-06-30T23:58:06Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2000-06-30T23:58:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ffcc3813d82e6b96db79f518f4e67b940a13ce64'/>
<id>urn:sha1:ffcc3813d82e6b96db79f518f4e67b940a13ce64</id>
<content type='text'>
</content>
</entry>
</feed>
