Paul Sokolovsky
100cd36a0e
objstringio: Compile only if MICROPY_ENABLE_MOD_IO defined.
2014-04-26 20:59:39 +03:00
Paul Sokolovsky
cb9dc086a3
modio: Implement io.StringIO class.
2014-04-26 20:26:14 +03:00
Damien George
dbc81df5d4
Simplify names for argcheck.c / arg parsing.
2014-04-26 11:19:17 +01:00
Damien George
6d3c5e4301
Add ARRAY_SIZE macro, and use it where possible.
2014-04-26 10:47:29 +01:00
Damien George
d139c489ba
Merge branch 'master' of github.com:micropython/micropython
2014-04-26 10:31:58 +01:00
Damien George
6cebe24b7d
bare-arm: Disable more stuff to reduce binary size.
2014-04-26 10:31:38 +01:00
Damien George
107c9fb235
py: Make collections module configurable, enabled by default.
2014-04-26 10:31:15 +01:00
Paul Sokolovsky
e14d096cb7
objstr: Optimize .rstrip() by scanning string from end.
2014-04-26 06:48:31 +03:00
Paul Sokolovsky
881078403e
objstr: Implement .lstrip() & .rstrip().
...
Share code with .strip(). TODO: optimize .rstrip().
2014-04-26 06:20:08 +03:00
Paul Sokolovsky
12a9cfed76
modsocket: Make .send() support arbitrary objects with buffer interface.
...
This is CPython-compliant (except that CPython doesn't support buffer
protocol for str).
2014-04-26 05:54:22 +03:00
Paul Sokolovsky
45fb143ba6
streams: Make .write() support arbitrary objects with buffer interface.
...
This in particular fixes writing str vs bytes.
2014-04-26 05:54:16 +03:00
Damien George
1463c1fa82
py: Add MICROPY_ENABLE_DOC_STRING, disabled by default.
...
Also add a few STATIC's to some compile functions that should have them.
Addresses issue #521 .
2014-04-25 23:52:57 +01:00
Damien George
c492cf1f44
Merge branch 'master' of github.com:micropython/micropython
2014-04-25 23:45:52 +01:00
Damien George
daab651c5c
py, gc: Zero out newly allocated blocks in the GC.
...
Also add some more debugging output to gc_dump_alloc_table().
Now that newly allocated heap is always zero'd, maybe we just make this
a policy for the uPy API to keep it simple (ie any new implementation of
memory allocation must zero all allocations). This follows the D
language philosophy.
Before this patch, a previously used memory block which had pointers in
it may still retain those pointers if the new user of that block does
not actually use the entire block. Eg, if I want 5 blocks worth of
heap, I actually get 8 (round up to nearest 4). Then I never use the
last 3, so they keep their old values, which may be pointers pointing to
the heap, hence preventing GC.
In rare (or maybe not that rare) cases, this leads to long, unintentional
"linked lists" within the GC'd heap, filling it up completely. It's
pretty rare, because you have to reuse exactly that memory which is part
of this "linked list", and reuse it in just the right way.
This should fix issue #522 , and might have something to do with
issue #510 .
2014-04-25 23:37:55 +01:00
Paul Sokolovsky
755565d2cb
py: Support instance __call__ method.
2014-04-25 21:17:42 +03:00
Damien George
410f30772f
py, gc: Fix old gc_realloc for case when NULL is passed in as ptr.
2014-04-25 11:44:53 +00:00
Damien George
5be40afb4c
Merge pull request #515 from errordeveloper/qemu
...
Qemu
2014-04-24 22:24:00 +01:00
Damien George
c0dc7c3dfa
py, vm: Fix recent bug where state is freed too early.
2014-04-24 15:42:05 +01:00
Damien George
d5e8482c4a
py, vm: Free heap-allocated state if it was allocated on the heap.
2014-04-24 13:52:06 +01:00
Damien George
978939156d
Merge pull request #519 from pfalcon/exc-no-ptr-to-field
...
objexcept: Don't store args tuple within exception object.
2014-04-24 11:14:18 +01:00
Damien George
1cbb99d1db
Merge pull request #518 from pfalcon/vm-trace
...
vm: Add rudimentary bytecode execution tracing capability.
2014-04-24 11:06:10 +01:00
Paul Sokolovsky
1c1d902cd3
Makefile: Allow to override "super optimization" options used for some files.
...
To help with debugging issue like #510 for example.
2014-04-24 02:59:43 +03:00
Paul Sokolovsky
6c94abe347
windows/README: Use CROSS_COMPILE instead of CC to cover other tools too.
...
Suggested by @lurch.
2014-04-23 20:45:53 +03:00
Paul Sokolovsky
1acf22f17b
objexcept: Don't store args tuple within exception object.
...
To avoid pointer-to-field GC problem.
2014-04-23 04:07:00 +03:00
Paul Sokolovsky
c5e32c6995
vm: Add rudimentary bytecode execution tracing capability.
2014-04-23 03:46:00 +03:00