8000 unix-cpy: Remove unix-cpy. It's no longer needed. · micropython/micropython@65dc960 · GitHub < 8000 body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
Skip to content

Commit 65dc960

Browse files
committed
unix-cpy: Remove unix-cpy. It's no longer needed.
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.
1 parent 0e97834 commit 65dc960

File tree

157 files changed

+26
-17742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+26
-17742
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ before_script:
1616
script:
1717
- make -C minimal test
1818
- make -C unix CC=gcc-4.7
19-
- make -C unix-cpy CC=gcc-4.7
2019
- make -C bare-arm
2120
- make -C qemu-arm test
2221
- make -C stmhal

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Additional components:
4747
- pic16bit/ -- a version of Micro Python for 16-bit PIC microcontrollers.
4848
- cc3200/ -- a version of Micro Python that runs on the CC3200 from TI.
4949
- esp8266/ -- an experimental port for ESP8266 WiFi modules.
50-
- unix-cpy/ -- a version of Micro Python that outputs bytecode (for testing).
5150
- tests/ -- test framework and test scripts.
5251
- tools/ -- various tools, including the pyboard.py module.
5352
- examples/ -- a few example Python scripts.

0 commit comments

Comments
 (0)
0