<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/peephole.c, branch 3.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/Python/peephole.c?h=3.1</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/peephole.c?h=3.1'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2011-04-15T13:38:34Z</updated>
<entry>
<title>Issue #5057: fix a bug in the peepholer that led to non-portable pyc files between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP chars (e.g. "\U00012345"[0]).</title>
<updated>2011-04-15T13:38:34Z</updated>
<author>
<name>Ezio Melotti</name>
<email>ezio.melotti@gmail.com</email>
</author>
<published>2011-04-15T13:38:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2df6a939164a8aec914086137f1242c205312f72'/>
<id>urn:sha1:2df6a939164a8aec914086137f1242c205312f72</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Recorded merge of revisions 81032 via svnmerge from</title>
<updated>2010-05-09T16:14:21Z</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2010-05-09T16:14:21Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7f14f0d8a0228c50d5b5de2acbfe9a64ebc6749a'/>
<id>urn:sha1:7f14f0d8a0228c50d5b5de2acbfe9a64ebc6749a</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines

  Recorded merge of revisions 81029 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

    Untabify C files. Will watch buildbots.
  ........
................
</content>
</entry>
<entry>
<title>Merged revisions 74126,74130-74131,74149,74155,74157,74180-74183,74398 via svnmerge from</title>
<updated>2009-08-13T09:34:05Z</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2009-08-13T09:34:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=194da4a7da15caae7f21204bc40bca7c8084b925'/>
<id>urn:sha1:194da4a7da15caae7f21204bc40bca7c8084b925</id>
<content type='text'>
svn+ssh://svn.python.org/python/branches/py3k

................
  r74126 | alexandre.vassalotti | 2009-07-21 02:39:03 +0200 (Di, 21 Jul 2009) | 14 lines

  Merged revisions 73871 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r73871 | alexandre.vassalotti | 2009-07-06 22:17:30 -0400 (Mon, 06 Jul 2009) | 7 lines

    Grow the allocated buffer in PyUnicode_EncodeUTF7 to avoid buffer overrun.

    Without this change, test_unicode.UnicodeTest.test_codecs_utf7 crashes in
    debug mode. What happens is the unicode string u'\U000abcde' with a length
    of 1 encodes to the string '+2m/c3g-' of length 8. Since only 5 bytes is
    reserved in the buffer, a buffer overrun occurs.
  ........
................
  r74130 | alexandre.vassalotti | 2009-07-21 02:57:50 +0200 (Di, 21 Jul 2009) | 2 lines

  Add ignore rule for the Doc/tools/jinga2/ directory.
................
  r74131 | alexandre.vassalotti | 2009-07-21 04:51:58 +0200 (Di, 21 Jul 2009) | 13 lines

  Merged revisions 73683,73786 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r73683 | georg.brandl | 2009-06-29 10:44:49 -0400 (Mon, 29 Jun 2009) | 1 line

    Fix error handling in PyCode_Optimize, by Alexander Schremmer at EuroPython sprint.
  ........
    r73786 | benjamin.peterson | 2009-07-02 18:56:16 -0400 (Thu, 02 Jul 2009) | 1 line

    condense with assertRaises
  ........
................
  r74149 | ezio.melotti | 2009-07-21 22:37:52 +0200 (Di, 21 Jul 2009) | 9 lines

  Merged revisions 74148 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74148 | ezio.melotti | 2009-07-21 23:18:27 +0300 (Tue, 21 Jul 2009) | 1 line

    #6536 fixed typo
  ........
................
  r74155 | alexandre.vassalotti | 2009-07-22 04:24:49 +0200 (Mi, 22 Jul 2009) | 2 lines

  Issue #6242: Fix deallocator of io.StringIO and io.BytesIO.
................
  r74157 | alexandre.vassalotti | 2009-07-22 05:07:33 +0200 (Mi, 22 Jul 2009) | 2 lines

  Issue #6241: Better type checking for the arguments of io.StringIO.
................
  r74180 | ezio.melotti | 2009-07-22 23:17:14 +0200 (Mi, 22 Jul 2009) | 9 lines

  Merged revisions 74179 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74179 | ezio.melotti | 2009-07-23 00:08:49 +0300 (Thu, 23 Jul 2009) | 1 line

    #6423 has_key -&gt; in
  ........
................
  r74181 | alexandre.vassalotti | 2009-07-22 23:27:53 +0200 (Mi, 22 Jul 2009) | 6 lines

  Clean up test_curses.

  By using __stdout__ directly, test_curses caused regrtest.py
  to duplicate the output of some test results.
................
  r74182 | alexandre.vassalotti | 2009-07-22 23:29:01 +0200 (Mi, 22 Jul 2009) | 2 lines

  Use assertGreater instead of assertTrue(x &gt; y).
................
  r74183 | alexandre.vassalotti | 2009-07-23 01:27:17 +0200 (Do, 23 Jul 2009) | 4 lines

  Specialize assertTrue checks when possible.

  We should get slightly more helpful failure messages with this change.
................
  r74398 | georg.brandl | 2009-08-13 11:16:39 +0200 (Do, 13 Aug 2009) | 1 line

  #6694: fix old function names.
................
</content>
</entry>
<entry>
<title>Fix 2 oversights from r69961.</title>
<updated>2009-02-28T19:49:43Z</updated>
<author>
<name>Jeffrey Yasskin</name>
<email>jyasskin@gmail.com</email>
</author>
<published>2009-02-28T19:49:43Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4dd40525e6b377fb06643311ce66b06c459a4589'/>
<id>urn:sha1:4dd40525e6b377fb06643311ce66b06c459a4589</id>
<content type='text'>
</content>
</entry>
<entry>
<title>http://bugs.python.org/issue4715</title>
<updated>2009-02-25T02:25:04Z</updated>
<author>
<name>Jeffrey Yasskin</name>
<email>jyasskin@gmail.com</email>
</author>
<published>2009-02-25T02:25:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9de7ec7868554e92700e4bda6c5f9d8fcad634dc'/>
<id>urn:sha1:9de7ec7868554e92700e4bda6c5f9d8fcad634dc</id>
<content type='text'>
This patch by Antoine Pitrou optimizes the bytecode for conditional branches by
merging the following "POP_TOP" instruction into the conditional jump.  For
example, the list comprehension "[x for x in l if not x]" produced the
following bytecode:

  1           0 BUILD_LIST               0
              3 LOAD_FAST                0 (.0)
        &gt;&gt;    6 FOR_ITER                23 (to 32)
              9 STORE_FAST               1 (x)
             12 LOAD_FAST                1 (x)
             15 JUMP_IF_TRUE            10 (to 28)
             18 POP_TOP
             19 LOAD_FAST                1 (x)
             22 LIST_APPEND              2
             25 JUMP_ABSOLUTE            6
        &gt;&gt;   28 POP_TOP
             29 JUMP_ABSOLUTE            6
        &gt;&gt;   32 RETURN_VALUE

but after the patch it produces the following bytecode:

  1           0 BUILD_LIST               0
              3 LOAD_FAST                0 (.0)
        &gt;&gt;    6 FOR_ITER                18 (to 27)
              9 STORE_FAST               1 (x)
             12 LOAD_FAST                1 (x)
             15 POP_JUMP_IF_TRUE         6
             18 LOAD_FAST                1 (x)
             21 LIST_APPEND              2
             24 JUMP_ABSOLUTE            6
        &gt;&gt;   27 RETURN_VALUE

Notice that not only the code is shorter, but the conditional jump
(POP_JUMP_IF_TRUE) jumps right to the start of the loop instead of going through
the JUMP_ABSOLUTE at the end. "continue" statements are helped
similarly.

Furthermore, the old jump opcodes (JUMP_IF_FALSE, JUMP_IF_TRUE) have been
replaced by two new opcodes:
- JUMP_IF_TRUE_OR_POP, which jumps if true and pops otherwise
- JUMP_IF_FALSE_OR_POP, which jumps if false and pops otherwise
</content>
</entry>
<entry>
<title>Issue 2260: Small peephole optimization -- eliminate unnecessary POP_TOP /JUMP_FORWARD 1 pairs.</title>
<updated>2008-11-18T00:07:10Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2008-11-18T00:07:10Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e56131b60e6c2e63bcb6ecc2a6b7964d74ab847d'/>
<id>urn:sha1:e56131b60e6c2e63bcb6ecc2a6b7964d74ab847d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename PyUnicode_AsString -&gt; _PyUnicode_AsString and</title>
<updated>2008-08-07T18:54:33Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2008-08-07T18:54:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4cc0f24857c345ba99691b2ae6829c6ce3c0edcd'/>
<id>urn:sha1:4cc0f24857c345ba99691b2ae6829c6ce3c0edcd</id>
<content type='text'>
PyUnicode_AsStringAndSize -&gt; _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.

We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
</content>
</entry>
<entry>
<title>Renamed PyString to PyBytes</title>
<updated>2008-05-26T13:28:38Z</updated>
<author>
<name>Christian Heimes</name>
<email>christian@cheimes.de</email>
</author>
<published>2008-05-26T13:28:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=72b710a59617ebe6dd1c41613d2c7eb81702efd9'/>
<id>urn:sha1:72b710a59617ebe6dd1c41613d2c7eb81702efd9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merged revisions 61834,61841-61842,61851-61853,61863-61864,61869-61870,61874,61889 via svnmerge from</title>
<updated>2008-03-25T14:56:36Z</updated>
<author>
<name>Christian Heimes</name>
<email>christian@cheimes.de</email>
</author>
<published>2008-03-25T14:56:36Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cc47b05fe5c66bb2f1e520234039070044dad218'/>
<id>urn:sha1:cc47b05fe5c66bb2f1e520234039070044dad218</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r61834 | raymond.hettinger | 2008-03-24 07:07:49 +0100 (Mon, 24 Mar 2008) | 1 line

  Tighten documentation for Random.triangular.
........
  r61841 | raymond.hettinger | 2008-03-24 09:17:39 +0100 (Mon, 24 Mar 2008) | 1 line

  Issue 2460: Make Ellipsis objects copyable.
........
  r61842 | georg.brandl | 2008-03-24 10:34:34 +0100 (Mon, 24 Mar 2008) | 2 lines

  #1700821: add a note to audioop docs about signedness of sample formats.
........
  r61851 | christian.heimes | 2008-03-24 20:57:42 +0100 (Mon, 24 Mar 2008) | 1 line

  Added quick hack for bzr
........
  r61852 | christian.heimes | 2008-03-24 20:58:17 +0100 (Mon, 24 Mar 2008) | 1 line

  Added quick hack for bzr
........
  r61853 | amaury.forgeotdarc | 2008-03-24 22:04:10 +0100 (Mon, 24 Mar 2008) | 4 lines

  Issue2469: Correct a typo I introduced at r61793: compilation error with UCS4 builds.

  All buildbots compile with UCS2...
........
  r61863 | neal.norwitz | 2008-03-25 05:17:38 +0100 (Tue, 25 Mar 2008) | 2 lines

  Fix a bunch of UnboundLocalErrors when the tests fail.
........
  r61864 | neal.norwitz | 2008-03-25 05:18:18 +0100 (Tue, 25 Mar 2008) | 2 lines

  Try to fix a bunch of compiler warnings on Win64.
........
  r61869 | neal.norwitz | 2008-03-25 07:35:10 +0100 (Tue, 25 Mar 2008) | 3 lines

  Don't try to close a non-open file.
  Don't let file removal cause the test to fail.
........
  r61870 | neal.norwitz | 2008-03-25 08:00:39 +0100 (Tue, 25 Mar 2008) | 7 lines

  Try to get this test to be more stable:
   * disable gc during the test run because we are spawning objects and there
     was an exception when calling Popen.__del__
   * Always set an alarm handler so the process doesn't exit if the test fails
     (should probably add assertions on the value of hndl_called in more places)
   * Using a negative time causes Linux to treat it as zero, so disable that test.
........
  r61874 | gregory.p.smith | 2008-03-25 08:31:28 +0100 (Tue, 25 Mar 2008) | 2 lines

  Use a 32-bit unsigned int here, a long is not needed.
........
  r61889 | georg.brandl | 2008-03-25 12:59:51 +0100 (Tue, 25 Mar 2008) | 2 lines

  Move declarations to block start.
........
</content>
</entry>
<entry>
<title>Merged revisions 61038,61042-61045,61047,61050,61053,61055-61056,61058-61061 via svnmerge from</title>
<updated>2008-02-25T13:19:43Z</updated>
<author>
<name>Christian Heimes</name>
<email>christian@cheimes.de</email>
</author>
<published>2008-02-25T13:19:43Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=dcca98d483f8a86c187c4d72f2e220a56ed0a1c0'/>
<id>urn:sha1:dcca98d483f8a86c187c4d72f2e220a56ed0a1c0</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r61058 | neal.norwitz | 2008-02-25 02:45:37 +0100 (Mon, 25 Feb 2008) | 1 line

  Fix indentation
........
  r61059 | brett.cannon | 2008-02-25 06:33:07 +0100 (Mon, 25 Feb 2008) | 2 lines

  Add minor markup for a string.
........
  r61060 | brett.cannon | 2008-02-25 06:33:33 +0100 (Mon, 25 Feb 2008) | 2 lines

  Fix a minor typo in a docstring.
........
</content>
</entry>
</feed>
