Paul Sokolovsky
910843e86d
Allow ports to define statically builtin functions.
...
Convert unix open() to such.
2014-02-14 12:13:34 +02:00
Damien George
70d7a83c74
stm: If SD card inserted on hard reset, it is the medium for USB MSD.
2014-02-13 23:21:02 +00:00
Paul Sokolovsky
e7299b5296
Add testcase for "from module import *".
2014-02-14 00:30:36 +02:00
Paul Sokolovsky
b2e8c52298
Add testcase for "from module import sym".
2014-02-14 00:30:36 +02:00
Paul Sokolovsky
da1ce93da8
Implement "from module import *" construct.
2014-02-14 00:30:36 +02:00
Damien George
a8d404e0e1
Merge branch 'master' of github.com:micropython/micropython
2014-02-12 23:02:49 +00:00
Damien George
099a9cb575
Remove mp_obj_new_exception_msg_1_arg and _2_arg.
2014-02-12 23:02:19 +00:00
Paul Sokolovsky
2aa217b974
Implement full arg handling for exec().
2014-02-13 00:36:54 +02:00
Damien George
780ba22bb8
stm: Copy COPT style from unix port.
2014-02-12 20:55:33 +00:00
Damien George
648d9e6447
Merge pull request #279 from pfalcon/make-copt
...
unix Makefile: Split off optimization options to COPT variable.
2014-02-12 20:53:00 +00:00
Paul Sokolovsky
5be1b2873b
unix Makefile: Split off optimization options to COPT variable.
...
To allow easily try different optimization and configuration options
without patching any files.
2014-02-12 20:20:39 +02:00
Paul Sokolovsky
520e2f58a5
Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.
2014-02-12 18:31:30 +02:00
Paul Sokolovsky
d5df6cd44a
Replace global "static" -> "STATIC", to allow "analysis builds". Part 1.
...
Some tools do not support local/static symbols (one example is GNU ld map file).
Exposing all functions will allow to do detailed size comparisons, etc.
Also, added bunch of statics where they were missing, and replaced few identity
functions with global mp_identity().
2014-02-12 18:21:11 +02:00
Damien George
1d1e38d911
Merge branch 'master' of github.com:micropython/micropython
2014-02-11 21:59:25 +00:00
Damien George
9d324b0ac7
stm: Add specific UINT_FMT and INT_FMT.
...
For some reason, STM port, while it's 32 bit, needs %lu and %ld for
printing machine_uint_t and machine_int_t.
2014-02-11 21:58:08 +00:00
Paul Sokolovsky
550d804d95
Add prototype for gc_dump_info().
2014-02-11 23:53:34 +02:00
Damien George
323f39a2b3
Merge pull request #278 from pfalcon/unix-gc
...
Enable GC for Unix port
2014-02-11 21:42:09 +00:00
Damien George
0d14d13016
Merge pull request #277 from pfalcon/link-map
...
Enable link map file generation.
2014-02-11 21:36:57 +00:00
Damien George
bbe39b62bc
Merge pull request #276 from dhylands/cleanup-warnings
...
Bah - Removed a couple of warnings for teensy that I didn't notice before.
2014-02-11 21:36:04 +00:00
Paul Sokolovsky
723a6ed371
More GC debugging improvements.
2014-02-11 18:09:50 +02:00
Paul Sokolovsky
20632e4d3f
stm: Provide malloc()/realloc()/free(), as forwarding to gc_*() functions.
...
Note: none of these functions are used by STM port, so they're provided
to have parity with pre gc refactor status quo, and in case they will be
needed in the future by some extension writers.
2014-02-11 18:09:50 +02:00
Paul Sokolovsky
e7db8171d8
unix: Implement garbage collection support.
2014-02-11 16:20:02 +02:00
Paul Sokolovsky
b62c30b4bc
Generalize malloc-via-gc-heap support, make it available to unix port.
2014-02-11 16:20:02 +02:00
Paul Sokolovsky
8d90a382cf
basics/enumerate.py: Don't turn enumerate test into heap test.
...
With range(10000), doesn't fit into 128K heap.
2014-02-11 15:34:32 +02:00
Paul Sokolovsky
4e2460852a
objstr: Mark few local symbols as static, cleanup codestyle.
...
Please don't submit patches with tab indentation!
2014-02-11 15:34:32 +02:00
Paul Sokolovsky
c0a8374103
gc: Don't segfault if gc_realloc() fails.
2014-02-11 15:34:32 +02:00
Paul Sokolovsky
287d9620fc
Enable link map file generation.
2014-02-11 14:42:20 +02:00
Paul Sokolovsky
a075741c90
Rename str_join -> strjoin to make it not clash with objstr's one.
2014-02-11 14:39:10 +02:00
Dave Hylands
6a6ac8e4c7
Bah - Removed a couple of warnings for teensy that I didn't notice before.
2014-02-10 21:33:03 -08:00
Paul Sokolovsky
af19cbd201
gc: Make debug output configurable, revamp test function.
...
Test function needs to be called by something else. Test heap size reduced so
its dump fits on a screenful of a typical terminal.
2014-02-11 02:31:28 +02:00
Paul Sokolovsky
4e836fb4ea
mp_obj_equal(): Instead of assert(), throw NotImplementedError.
...
With a nice traceback, helps debugging much better.
2014-02-11 02:28:36 +02:00
Paul Sokolovsky
0a25aba046
Typo fix in comment.
2014-02-11 02:28:36 +02:00
Damien George
181d190643
stm: Remove unused, useless and not-to-be-used strndup.
...
Addresses issue #275 .
2014-02-10 22:55:15 +00:00
Damien George
f1081f400b
Merge branch 'master' of github.com:micropython/micropython
2014-02-10 22:51:35 +00:00
Damien George
ed378cd12f
stm: Tidy up memory labels; optimise GC root scanning.
...
Addresses issues #272 and #273 .
2014-02-10 22:50:44 +00:00
Damien George
724026ab40
Merge pull request #271 from dhylands/teensy-2014-02-10
...
Updated teensy to work with latest on master
2014-02-10 22:02:47 +00:00
Damien George
b0b7518dd1
Merge pull request #270 from pfalcon/down-with-calloc
...
Get rid of calloc().
2014-02-10 22:00:36 +00:00
Damien George
e8d2c3cf6c
Merge pull request #267 from pfalcon/func-ret-ann
...
Clean up handling of function return type annotation.
2014-02-10 21:59:11 +00:00
Damien George
d46ca25757
Fix some int casting that failed on 64 bit architecture.
2014-02-10 21:46:47 +00:00
Damien George
8c2b333aff
Merge branch 'master' of github.com:micropython/micropython
2014-02-10 21:41:14 +00:00
Dave Hylands
6f9c03676b
Updated teensy to work with latest on master
...
Added analogRead, analogWriteXxx and servo support for teensy.
2014-02-10 09:06:41 -08:00
Paul Sokolovsky
58ff93bc7c
Get rid of calloc().
...
If there's malloc and memset, then there's no need for calloc, especially if
we need to implement it ourselves.
2014-02-10 18:40:00 +02:00
Paul Sokolovsky
2e24ee8d80
socket: Tighten up int-to-str conversion.
2014-02-10 18:39:10 +02:00
Paul Sokolovsky
8c25201d9d
socket: Make sure that symbol definitions are const.
2014-02-10 18:39:06 +02:00
Paul Sokolovsky
ac0134d427
Factor out mp_seq_count_obj() and implement tuple.count().
2014-02-10 07:13:32 +02:00
Paul Sokolovsky
624eff6a8a
Implement tuple.index().
2014-02-10 07:13:32 +02:00
Paul Sokolovsky
0cd1dc06e6
Factor out mp_seq_index_obj() function to implement .index() on sequences.
2014-02-10 07:13:32 +02:00
Paul Sokolovsky
2f0b026a44
Clean up handling of function return type annotation.
2014-02-10 02:04:26 +02:00
Paul Sokolovsky
76f06de96d
Add NotImplementedError.
2014-02-09 13:17:36 +02:00
Paul Sokolovsky
f766264582
unix: Implement time.sleep().
2014-02-09 12:52:04 +02:00