Damien George
0b9ee86133
py: Add mp_obj_new_str_from_vstr, and use it where relevant.
...
This patch allows to reuse vstr memory when creating str/bytes object.
This improves memory usage.
Also saves code ROM: 128 bytes on stmhal, 92 bytes on bare-arm, and 88
bytes on unix x64.
2015-01-21 23:17:27 +00:00
Paul Sokolovsky
2e526ff1a1
modffi: Support return values of mp_obj_t type.
2015-01-22 01:09:17 +02:00
Paul Sokolovsky
8064892c9b
builtinimport: Make sure that qstr is used properly to load frozen modules.
2015-01-21 23:14:46 +02:00
Damien George
b6e6b5277f
py: Implement proper re-raising in native codegen's finally handler.
...
This allows an exception to propagate correctly through a finally
handler.
2015-01-21 17:00:01 +00:00
Damien George
962a5d50c9
py: Implement __reversed__ slot.
...
Addresses issue #1073 .
2015-01-21 00:19:42 +00:00
Dave Hylands
d7f199465f
stmhal: Add support for FEZ Cerb40 II board from ghielectronics.com.
2015-01-21 00:11:04 +00:00
Damien George
73533247cb
docs: Fix frequency info for DAC.triangle.
2015-01-20 23:56:10 +00:00
stijn
bf19541f46
py: Prevent segfault for operations on closed StringIO.
...
Addresses issue #1067 .
2015-01-20 23:50:43 +00:00
Paul Sokolovsky
0ab3fc3805
modffi: Support open own executable using open(None).
2015-01-21 00:38:06 +02:00
Damien George
50149a5730
py: Use mp_arg_check_num in some _make_new functions.
...
Reduces stmhal code size by about 250 bytes.
2015-01-20 14:11:27 +00:00
Damien George
ff8dd3f486
py, unix: Allow to compile with -Wunused-parameter.
...
See issue #699 .
2015-01-20 12:47:20 +00:00
Damien George
50912e7f5d
py, unix, stmhal: Allow to compile with -Wshadow.
...
See issue #699 .
2015-01-20 11:55:10 +00:00
Paul Sokolovsky
640e0b221e
py: Implement very simple frozen modules support.
...
Only modules (not packages) supported now. Source modules can be converted
to frozen module structures using tools/make-frozen.py script.
2015-01-20 11:52:12 +02:00
Paul Sokolovsky
438b3d26b5
esp8266: Add missing hard_reset qstr.
2015-01-18 00:37:46 +02:00
Paul Sokolovsky
f1700a5154
esp8266:modpyb: Implement hard_reset().
2015-01-18 00:30:14 +02:00
Damien George
51ef28a9d6
unix: Update .gitignore for "fast" and "minimal" builds.
2015-01-16 18:05:31 +00:00
Damien George
3926c72dd2
unix: Add target to build "minimal" uPy interpreter.
2015-01-16 18:03:01 +00:00
Damien George
963a5a3e82
py, unix: Allow to compile with -Wsign-compare.
...
See issue #699 .
2015-01-16 17:47:07 +00:00
Paul Sokolovsky
f12ea7c7ed
esp8266: Implement task-based, event-driven interface with UART.
...
This enables proper interfacing with underlying OS - MicroPython doesn't
run the main loop, OS does, MicroPython just gets called when some event
takes place.
2015-01-16 19:20:17 +02:00
Damien George
0abb5609b0
py: Remove unnecessary id_flags argument from emitter's load_fast.
...
Saves 24 bytes in bare-arm.
2015-01-16 12:24:49 +00:00
Paul Sokolovsky
2276eb8084
minimal: Make #if indent consistent.
2015-01-16 01:53:33 +02:00
Paul Sokolovsky
d7337f288e
minimal: Support even-driven REPL.
2015-01-16 01:38:24 +02:00
Paul Sokolovsky
87bc8e2b3d
pyexec: Add event-driven variant pyexec_friendly_repl().
...
pyexec_friendly_repl_process_char() and friends, useful for ports which
integrate into existing cooperative multitasking system.
Unlike readline() refactor before, this was implemented in less formal,
trial&error process, minor functionality regressions are still known
(like soft&hard reset support). So, original loop-based pyexec_friendly_repl()
is left intact, specific implementation selectable by config setting.
2015-01-16 01:30:42 +02:00
Paul Sokolovsky
c6b8750c14
esp8266: Use dedicated heap allocated as static array.
...
We cannot assume that all memory belongs to us - it actually belongs to
ESP8266 OS.
2015-01-15 00:36:03 +02:00
Damien George
d2d64f00fb
py: Add "default" to switches to allow better code flow analysis.
...
This helps compiler produce smaller code. Saves 124 bytes on stmhal and
bare-arm.
2015-01-14 21:32:42 +00:00