Damien George
584ba6762f
py: Move global/nonlocal decl code to compiler for proper SyntaxError.
...
This patch gives proper SyntaxError exceptions for bad global/nonlocal
declarations. It also reduces code size: 304 bytes on unix x64, 132
bytes on stmhal.
2014-12-21 17:26:45 +00:00
Damien George
b063b9b36d
py: Fix iteration over map in 2 places.
2014-12-21 16:24:09 +00:00
Damien George
7b80d908bf
docs: Add RTD local_settings file, to add custom templates.
2014-12-21 11:21:06 +00:00
Damien George
9b561a7c0d
docs: Add custom CSS file, with code for admonition.
2014-12-21 00:22:49 +00:00
Paul Sokolovsky
4b60b45bfc
stmhal: gccollect.h is superfluous in many places.
2014-12-21 00:58:06 +02:00
Paul Sokolovsky
6aaccc484c
stmhal: Use gc_dump_info() function instead of adhoc code.
2014-12-21 00:26:10 +02:00
Paul Sokolovsky
bf19586c53
stmhal: Include MICROPY_HAL_H only if defined.
...
Helps other ports.
2014-12-20 20:47:35 +02:00
Damien George
6efa66f125
py: Remove unnecessary RULE_none and PN_none from parser.
2014-12-20 18:41:59 +00:00
Damien George
b47ea4eadd
py: Add blank and ident flags to grammar rules to simplify parser.
...
This saves around 100 bytes code space on stmhal, more on unix.
2014-12-20 18:37:50 +00:00
Damien George
4fd7c1a2ac
tools, pyboard.py: Write data to pyboard in chunks of 256 bytes.
...
This speeds up writes significantly.
2014-12-20 18:09:04 +00:00
Damien George
2870d85a11
py: Save a few code bytes in parser; make vars local where possible.
2014-12-20 18:06:08 +00:00
Paul Sokolovsky
978f4ca2e1
run-tests: Allow to run testuite against Windows build on Linux (using Wine).
...
Just adjust line-endings of micropython.exe output, the rest should be
handled by Wine (automagically on properly configured distro).
To run:
MICROPY_MICROPYTHON=../windows/micropython.exe ./run-tests
2014-12-20 16:53:46 +02:00
stijn
f5efefd5a0
windows: Correctly interpret skipped tests, enable uhashlib and ubinascii
2014-12-20 16:52:22 +02:00
Damien George
6d3ae569cf
docs: Add CPy diff note for print_exception; embellish sys.platform.
2014-12-19 22:10:38 +00:00
Damien George
2a3e2b9033
py: Add execfile function (from Python 2); enable in stmhal port.
...
Adds just 60 bytes to stmhal binary. Addresses issue #362 .
2014-12-19 13:36:17 +00:00
Paul Sokolovsky
8427c5b76c
unix/windows: Make sure that process exit code is portable 8-bit value.
...
This fixes FORCED_EXIT internal flag leaking into Windows exit code.
2014-12-19 00:01:49 +02:00
Damien George
f04329e93b
lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal.
...
acoshf, asinhf, atanhf were added from musl. mathsincos.c was
split up into its original, separate files (from newlibe-nano-2).
tan was added.
All of the important missing float functions are now implemented,
and pyboard now passes tests/float/math_fun.py (finally!).
2014-12-18 14:44:02 +00:00
Damien George
6936f4626c
tests: Get misc/print_exception and pyb/spi working on pyboard.
2014-12-18 13:37:56 +00:00
Paul Sokolovsky
c8b0229bc7
tests: sha256: skip test if uhashlib module is not available.
2014-12-18 00:32:15 +02:00
Gregory
5cf7ac7309
Fix leds.rst
...
N (mod 4) is 0..3
2014-12-18 00:06:48 +03:00
Paul Sokolovsky
9d944c7fb2
unix: Rename "time" module to "utime" to allow extensibility.
...
Name choosen per latest conventions and for compatibiity with stmhal port.
2014-12-17 00:13:32 +02:00
Damien George
9642846d71
docs: Define more clearly the behaviour of LED methods.
...
Addresses issue #1006 .
2014-12-16 11:55:46 +00:00
Paul Sokolovsky
0078561303
modffi: Support void (None) return value for Python callback functions.
2014-12-16 00:28:12 +02:00
Paul Sokolovsky
7a4765dbeb
tests: Add testcase for ffi callbacks.
2014-12-15 02:18:54 +02:00
Paul Sokolovsky
b62371e8fb
modffi: 64-bit cleanness (fixes actual bug in callback arg handling).
2014-12-15 02:18:49 +02:00