<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/peephole.c, branch misc-acks-comment</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>Produce cleaner bytecode for 'with' and 'async with' by generating separate code for normal and exceptional paths. (#6641)</title>
<updated>2019-11-21T09:11:43+00:00</updated>
<author>
<name>Mark Shannon</name>
<email>mark@hotpy.org</email>
</author>
<published>2019-11-21T09:11:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=fee552669f21ca294f57fe0df826945edc779090'/>
<id>fee552669f21ca294f57fe0df826945edc779090</id>
<content type='text'>
Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication.
Reimplement frame.lineno setter using line numbers rather than bytecode offsets.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication.
Reimplement frame.lineno setter using line numbers rather than bytecode offsets.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unused variable and signed/unsigned warnings (GH-15537)</title>
<updated>2019-08-27T16:55:13+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>rhettinger@users.noreply.github.com</email>
</author>
<published>2019-08-27T16:55:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0138c4ceab1e10d42d0aa962d2ae079b46da7671'/>
<id>0138c4ceab1e10d42d0aa962d2ae079b46da7671</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099)</title>
<updated>2019-06-15T14:58:00+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2019-06-15T14:58:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=7a68f8c28bb78d957555a5001dac4df6345434a0'/>
<id>7a68f8c28bb78d957555a5001dac4df6345434a0</id>
<content type='text'>

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)</title>
<updated>2019-06-14T05:54:53+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2019-06-14T05:54:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=05f831865545b08c9a21cfb7773af58b76ec64cb'/>
<id>05f831865545b08c9a21cfb7773af58b76ec64cb</id>
<content type='text'>
Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form:

if True and False:
   do_something()

to be optimized incorrectly, eliminating the block.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form:

if True and False:
   do_something()

to be optimized incorrectly, eliminating the block.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)</title>
<updated>2019-06-13T18:16:22+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2019-06-13T18:16:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=3498c642f4e83f3d8e2214654c0fa8e0d51cebe5'/>
<id>3498c642f4e83f3d8e2214654c0fa8e0d51cebe5</id>
<content type='text'>
The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332)</title>
<updated>2019-05-17T10:37:08+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2019-05-17T10:37:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=af8646c8054d0f4180a2013383039b6a472f9698'/>
<id>af8646c8054d0f4180a2013383039b6a472f9698</id>
<content type='text'>
Move the check for dead conditionals (if 0) to the peephole optimizer
and make sure that the code block is still compiled to report any
existing syntax errors within.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the check for dead conditionals (if 0) to the peephole optimizer
and make sure that the code block is still compiled to report any
existing syntax errors within.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-9566: Fix compiler warnings in peephole.c (GH-10652)</title>
<updated>2018-12-07T16:54:18+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-12-07T16:54:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=028f0ef4f3111d2b3fc5b971642e337ba7990873'/>
<id>028f0ef4f3111d2b3fc5b971642e337ba7990873</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418)</title>
<updated>2018-11-09T01:55:07+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@krypto.org</email>
</author>
<published>2018-11-09T01:55:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=49fa4a9f1ef387e16596f271414c855339eadf09'/>
<id>49fa4a9f1ef387e16596f271414c855339eadf09</id>
<content type='text'>
Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.

Do a bounds check within find_op so it can return before going past the end as a safety measure.

https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447#diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.

This bug was shipped in all Python 3.6 and 3.7 releases.

The included unittest won't fail unless you do a clang msan build.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.

Do a bounds check within find_op so it can return before going past the end as a safety measure.

https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447#diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.

This bug was shipped in all Python 3.6 and 3.7 releases.

The included unittest won't fail unless you do a clang msan build.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. (GH-5006)</title>
<updated>2018-02-22T21:33:30+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2018-02-22T21:33:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb'/>
<id>520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb</id>
<content type='text'>


Co-authored-by: Mark Shannon &lt;mark@hotpy.org&gt;
Co-authored-by: Antoine Pitrou &lt;antoine@python.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>


Co-authored-by: Mark Shannon &lt;mark@hotpy.org&gt;
Co-authored-by: Antoine Pitrou &lt;antoine@python.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29469: peephole: Remove const_stack (GH-4879)</title>
<updated>2017-12-18T06:52:54+00:00</updated>
<author>
<name>INADA Naoki</name>
<email>methane@users.noreply.github.com</email>
</author>
<published>2017-12-18T06:52:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=87010e85cb37192d63b1a30e5fabba307ad5a3f5'/>
<id>87010e85cb37192d63b1a30e5fabba307ad5a3f5</id>
<content type='text'>
Constant folding was moved to AST optimizer.
But compiler may emit LOAD_CONSTs + BUILD_TUPLE.
For example, default arguments can be constant tuple
if all arguments are constant.

This commit makes peephole's tuple folding simple.
It doesn't support nested tuples because nested
tuples are folded by AST optimizer already.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Constant folding was moved to AST optimizer.
But compiler may emit LOAD_CONSTs + BUILD_TUPLE.
For example, default arguments can be constant tuple
if all arguments are constant.

This commit makes peephole's tuple folding simple.
It doesn't support nested tuples because nested
tuples are folded by AST optimizer already.</pre>
</div>
</content>
</entry>
</feed>
