| Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
Any generated headers go in $(BUILD)/genhdr/, and are #included as
'genhdr/xxx.h'.
|
|
The autogenerated header files have been moved about, and an extra
include dir has been added, which means you can give a custom
BUILD=newbuilddir option to make, and everything "just works"
Also tidied up the way the different Makefiles build their include-
directory flags
|
|
|
|
|
|
Can now have null bytes in strings. Can define ROM qstrs per port using
qstrdefsport.h
|
|
Conflicts:
py/objint.c
unix-cpy/Makefile
unix/Makefile
|
|
|
|
|
|
Use make V=1e make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
This should fix issue #117
|
|
|
|
Now much more inline with how CPython does types.
|
|
So far, only start and stop integer indexes are supported. Step is
not supported, as well as objects of arbitrary types.
|
|
|
|
import works for simple cases. Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
|
|
|
|
|
|
|
|
|
|
|