<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/tests/bytecode, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>unix-cpy: Remove unix-cpy.  It's no longer needed.</title>
<updated>2015-08-17T11:51:26+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2015-08-14T11:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=65dc960e3b22a8426e369607e47c19b380ce30ea'/>
<id>65dc960e3b22a8426e369607e47c19b380ce30ea</id>
<content type='text'>
unix-cpy was originally written to get semantic equivalent with CPython
without writing functional tests.  When writing the initial
implementation of uPy it was a long way between lexer and functional
tests, so the half-way test was to make sure that the bytecode was
correct.  The idea was that if the uPy bytecode matched CPython 1-1 then
uPy would be proper Python if the bytecodes acted correctly.  And having
matching bytecode meant that it was less likely to miss some deep
subtlety in the Python semantics that would require an architectural
change later on.

But that is all history and it no longer makes sense to retain the
ability to output CPython bytecode, because:

1. It outputs CPython 3.3 compatible bytecode.  CPython's bytecode
changes from version to version, and seems to have changed quite a bit
in 3.5.  There's no point in changing the bytecode output to match
CPython anymore.

2. uPy and CPy do different optimisations to the bytecode which makes it
harder to match.

3. The bytecode tests are not run.  They were never part of Travis and
are not run locally anymore.

4. The EMIT_CPYTHON option needs a lot of extra source code which adds
heaps of noise, especially in compile.c.

5. Now that there is an extensive test suite (which tests functionality)
there is no need to match the bytecode.  Some very subtle behaviour is
tested with the test suite and passing these tests is a much better
way to stay Python-language compliant, rather than trying to match
CPy bytecode.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unix-cpy was originally written to get semantic equivalent with CPython
without writing functional tests.  When writing the initial
implementation of uPy it was a long way between lexer and functional
tests, so the half-way test was to make sure that the bytecode was
correct.  The idea was that if the uPy bytecode matched CPython 1-1 then
uPy would be proper Python if the bytecodes acted correctly.  And having
matching bytecode meant that it was less likely to miss some deep
subtlety in the Python semantics that would require an architectural
change later on.

But that is all history and it no longer makes sense to retain the
ability to output CPython bytecode, because:

1. It outputs CPython 3.3 compatible bytecode.  CPython's bytecode
changes from version to version, and seems to have changed quite a bit
in 3.5.  There's no point in changing the bytecode output to match
CPython anymore.

2. uPy and CPy do different optimisations to the bytecode which makes it
harder to match.

3. The bytecode tests are not run.  They were never part of Travis and
are not run locally anymore.

4. The EMIT_CPYTHON option needs a lot of extra source code which adds
heaps of noise, especially in compile.c.

5. Now that there is an extensive test suite (which tests functionality)
there is no need to match the bytecode.  Some very subtle behaviour is
tested with the test suite and passing these tests is a much better
way to stay Python-language compliant, rather than trying to match
CPy bytecode.
</pre>
</div>
</content>
</entry>
<entry>
<title>unix-cpy: Fix adjustment of stack size when leaving exception handler.</title>
<updated>2015-05-06T15:46:21+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2015-05-06T15:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=57ebe1b27d6ae10584d3b5f767e3cc5aa481c0b0'/>
<id>57ebe1b27d6ae10584d3b5f767e3cc5aa481c0b0</id>
<content type='text'>
Also remove __debug__ from one of the bytecode tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also remove __debug__ from one of the bytecode tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix README to match contents of run-tests</title>
<updated>2014-04-16T19:14:38+00:00</updated>
<author>
<name>Andrew Scheller</name>
</author>
<published>2014-04-16T19:14:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=83852d32156adaaa2a3174bea37977dc9982f405'/>
<id>83852d32156adaaa2a3174bea37977dc9982f405</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Add some bytecode tests.</title>
<updated>2014-04-12T17:00:32+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2014-04-12T17:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=c2803db010ab575e9387e4eaf2f8090b083b3c5f'/>
<id>c2803db010ab575e9387e4eaf2f8090b083b3c5f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>py, compiler: Allow lambda's to yield.</title>
<updated>2014-04-11T13:10:21+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2014-04-11T13:10:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0e3329a6b82873531f63fb1358f57852723fad05'/>
<id>0e3329a6b82873531f63fb1358f57852723fad05</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>py: Implement compiling of *-expr within parenthesis.</title>
<updated>2014-04-11T11:53:00+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2014-04-11T11:53:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0288cf020ebfa9026bb8a30f5708b44bc8a82feb'/>
<id>0288cf020ebfa9026bb8a30f5708b44bc8a82feb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change test scripts to use python3; bytecode tests use python3.4.</title>
<updated>2014-04-02T14:31:39+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2014-04-02T14:31:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=929a675a3d2d37fb8c6acbec1b999b9bdd84ff23'/>
<id>929a675a3d2d37fb8c6acbec1b999b9bdd84ff23</id>
<content type='text'>
I upgraded to Python 3.4.0, so needed to make these changes.  Hopefully
the tests still run with Python 3.3.x (the scripts use python3 so are
agnostic as to the subversion).

Bytecode tests are tightly coupled to the Python version, and now some
fail against Python 3.4.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I upgraded to Python 3.4.0, so needed to make these changes.  Hopefully
the tests still run with Python 3.3.x (the scripts use python3 so are
agnostic as to the subversion).

Bytecode tests are tightly coupled to the Python version, and now some
fail against Python 3.4.
</pre>
</div>
</content>
</entry>
<entry>
<title>py: Add built-in super.</title>
<updated>2014-02-05T00:51:47+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2014-02-05T00:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=35e2a4e6bb319a208af8d3e5c3e59cee7873400a'/>
<id>35e2a4e6bb319a208af8d3e5c3e59cee7873400a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bash-&gt;/usr/bin/env bash; add LICENSE for Python library tests.</title>
<updated>2014-01-02T16:14:19+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2014-01-02T16:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=bbabfb40ba300d36f36c4bbacd196e028c758974'/>
<id>bbabfb40ba300d36f36c4bbacd196e028c758974</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 2 files to a gitignore.</title>
<updated>2013-12-29T18:22:03+00:00</updated>
<author>
<name>Damien</name>
</author>
<published>2013-12-29T18:22:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=5ebbfe7e5119147ed1f49edb9d0d0dda42f68d71'/>
<id>5ebbfe7e5119147ed1f49edb9d0d0dda42f68d71</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
