<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Include/opcode.h, branch 2.3</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.3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/opcode.h?h=2.3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2003-04-24T05:45:23Z</updated>
<entry>
<title>Revert the previous enhancement to the bytecode optimizer.</title>
<updated>2003-04-24T05:45:23Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2003-04-24T05:45:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f4cf76dd5eabd8af5d2a866da1f75fa745aa6f29'/>
<id>urn:sha1:f4cf76dd5eabd8af5d2a866da1f75fa745aa6f29</id>
<content type='text'>
The additional code complexity and new NOP opcode were not worth it.
</content>
</entry>
<entry>
<title>Improved the bytecode optimizer.</title>
<updated>2003-04-22T06:49:11Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2003-04-22T06:49:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=060641d51160f6bf49a049bb677f8412b5a19de3'/>
<id>urn:sha1:060641d51160f6bf49a049bb677f8412b5a19de3</id>
<content type='text'>
* Can now test for basic blocks.
* Optimize inverted comparisions.
* Optimize unary_not followed by a conditional jump.
* Added a new opcode, NOP, to keep code size constant.
* Applied NOP to previous transformations where appropriate.

Note, the NOP would not be necessary if other functions were
added to re-target jump addresses and update the co_lnotab mapping.
That would yield slightly faster and cleaner bytecode at the
expense of optimizer simplicity and of keeping it decoupled
from the line-numbering structure.
</content>
</entry>
<entry>
<title>Further SET_LINENO reomval fixes.  See comments in patch #587933.</title>
<updated>2002-08-30T13:09:51Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-08-30T13:09:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=53d58bb369fbbc1ae93ca423f30b3beb2d83a9a1'/>
<id>urn:sha1:53d58bb369fbbc1ae93ca423f30b3beb2d83a9a1</id>
<content type='text'>
Use a slightly different strategy to determine when not to call the line
trace function.  This removes the need for the RETURN_NONE opcode, so
that's gone again.  Update docs and comments to match.

Thanks to Neal and Armin!

Also add a test suite.  This should have come with the original patch...
</content>
</entry>
<entry>
<title>This is my patch</title>
<updated>2002-08-15T14:59:02Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-08-15T14:59:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=dd32a91cc0c8ba178d7ee5e78c30b6920aff66f4'/>
<id>urn:sha1:dd32a91cc0c8ba178d7ee5e78c30b6920aff66f4</id>
<content type='text'>
[ 587993 ] SET_LINENO killer

Remove SET_LINENO.  Tracing is now supported by inspecting co_lnotab.

Many sundry changes to document and adapt to this change.
</content>
</entry>
<entry>
<title>The opcode FOR_LOOP no longer exists.</title>
<updated>2002-06-13T17:59:51Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-13T17:59:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fea59e7f766b950ccd55f9eee87d4032a768fdcc'/>
<id>urn:sha1:fea59e7f766b950ccd55f9eee87d4032a768fdcc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Patch #494783: Rename cmp_op enumerators.</title>
<updated>2002-01-01T19:59:11Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2002-01-01T19:59:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7198a525f3e926899ba238f6e6a2e6e9349b7de4'/>
<id>urn:sha1:7198a525f3e926899ba238f6e6a2e6e9349b7de4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement PEP 238 in its (almost) full glory.</title>
<updated>2001-08-08T05:00:18Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-08T05:00:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4668b000a1d9113394941ad39875c827634feb49'/>
<id>urn:sha1:4668b000a1d9113394941ad39875c827634feb49</id>
<content type='text'>
This introduces:

- A new operator // that means floor division (the kind of division
  where 1/2 is 0).

- The "future division" statement ("from __future__ import division)
  which changes the meaning of the / operator to implement "true
  division" (where 1/2 is 0.5).

- New overloadable operators __truediv__ and __floordiv__.

- New slots in the PyNumberMethods struct for true and floor division,
  new abstract APIs for them, new opcodes, and so on.

I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.

Not yet implemented are warnings (default off) when / is used with int
or long arguments.

This has been on display since 7/31 as SF patch #443474.

Flames to /dev/null.
</content>
</entry>
<entry>
<title>Merging the gen-branch into the main line, at Guido's direction.  Yay!</title>
<updated>2001-06-18T22:08:13Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-18T22:08:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5ca576ed0a0c697c7e7547adfd0b3af010fd2053'/>
<id>urn:sha1:5ca576ed0a0c697c7e7547adfd0b3af010fd2053</id>
<content type='text'>
Bugfix candidate in inspect.py:  it was referencing "self" outside of
a method.
</content>
</entry>
<entry>
<title>Iterators phase 1.  This comprises:</title>
<updated>2001-04-20T19:13:02Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-20T19:13:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=59d1d2b434e8cf79e8b1321f148254c68f56c1f7'/>
<id>urn:sha1:59d1d2b434e8cf79e8b1321f148254c68f56c1f7</id>
<content type='text'>
new slot tp_iter in type object, plus new flag Py_TPFLAGS_HAVE_ITER
new C API PyObject_GetIter(), calls tp_iter
new builtin iter(), with two forms: iter(obj), and iter(function, sentinel)
new internal object types iterobject and calliterobject
new exception StopIteration
new opcodes for "for" loops, GET_ITER and FOR_ITER (also supported by dis.py)
new magic number for .pyc files
new special method for instances: __iter__() returns an iterator
iteration over dictionaries: "for x in dict" iterates over the keys
iteration over files: "for x in file" iterates over lines

TODO:

documentation
test suite
decide whether to use a different way to spell iter(function, sentinal)
decide whether "for key in dict" is a good idea
use iterators in map/filter/reduce, min/max, and elsewhere (in/not in?)
speed tuning (make next() a slot tp_next???)
</content>
</entry>
<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>
</feed>
