Damien George
323f39a2b3
Merge pull request #278 from pfalcon/unix-gc
Enable GC for Unix port
11 years ago
Damien George
0d14d13016
Merge pull request #277 from pfalcon/link-map
Enable link map file generation.
11 years ago
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.
11 years ago
Paul Sokolovsky
723a6ed371
More GC debugging improvements.
11 years ago
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.
11 years ago
Paul Sokolovsky
e7db8171d8
unix: Implement garbage collection support.
11 years ago
Paul Sokolovsky
b62c30b4bc
Generalize malloc-via-gc-heap support, make it available to unix port.
11 years ago
Paul Sokolovsky
8d90a382cf
basics/enumerate.py: Don't turn enumerate test into heap test.
With range(10000), doesn't fit into 128K heap.
11 years ago
Paul Sokolovsky
4e2460852a
objstr: Mark few local symbols as static, cleanup codestyle.
Please don't submit patches with tab indentation!
11 years ago
Paul Sokolovsky
c0a8374103
gc: Don't segfault if gc_realloc() fails.
11 years ago
Paul Sokolovsky
287d9620fc
Enable link map file generation.
11 years ago
Paul Sokolovsky
a075741c90
Rename str_join -> strjoin to make it not clash with objstr's one.
11 years ago
Dave Hylands
6a6ac8e4c7
Bah - Removed a couple of warnings for teensy that I didn't notice before.
11 years ago
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.
11 years ago
Paul Sokolovsky
4e836fb4ea
mp_obj_equal(): Instead of assert(), throw NotImplementedError.
With a nice traceback, helps debugging much better.
11 years ago
Paul Sokolovsky
0a25aba046
Typo fix in comment.
11 years ago
Damien George
181d190643
stm: Remove unused, useless and not-to-be-used strndup.
Addresses issue #275 .
11 years ago
Damien George
f1081f400b
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
ed378cd12f
stm: Tidy up memory labels; optimise GC root scanning.
Addresses issues #272 and #273 .
11 years ago
Damien George
724026ab40
Merge pull request #271 from dhylands/teensy-2014-02-10
Updated teensy to work with latest on master
11 years ago
Damien George
b0b7518dd1
Merge pull request #270 from pfalcon/down-with-calloc
Get rid of calloc().
11 years ago
Damien George
e8d2c3cf6c
Merge pull request #267 from pfalcon/func-ret-ann
Clean up handling of function return type annotation.
11 years ago
Damien George
d46ca25757
Fix some int casting that failed on 64 bit architecture.
11 years ago
Damien George
8c2b333aff
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Dave Hylands
6f9c03676b
Updated teensy to work with latest on master
Added analogRead, analogWriteXxx and servo support for teensy.
11 years ago
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.
11 years ago
Paul Sokolovsky
2e24ee8d80
socket: Tighten up int-to-str conversion.
11 years ago
Paul Sokolovsky
8c25201d9d
socket: Make sure that symbol definitions are const.
11 years ago
Paul Sokolovsky
ac0134d427
Factor out mp_seq_count_obj() and implement tuple.count().
11 years ago
Paul Sokolovsky
624eff6a8a
Implement tuple.index().
11 years ago
Paul Sokolovsky
0cd1dc06e6
Factor out mp_seq_index_obj() function to implement .index() on sequences.
11 years ago
Paul Sokolovsky
2f0b026a44
Clean up handling of function return type annotation.
11 years ago
Paul Sokolovsky
76f06de96d
Add NotImplementedError.
11 years ago
Paul Sokolovsky
f766264582
unix: Implement time.sleep().
11 years ago
Paul Sokolovsky
f7c2410e65
Implement tuple multiplication.
11 years ago
Paul Sokolovsky
ee4aaf7cdd
Implement tuple addition.
11 years ago
Paul Sokolovsky
e827e98a6f
Implement tuple comparison.
11 years ago
Paul Sokolovsky
1a996c48ac
Refactor list comparison code to mp_seq_cmp_objs().
11 years ago
Paul Sokolovsky
557c9d5264
unix microsocket: Add dummy makefile() method.
Unlike CPython socket, microsocket object already implements stream protocol
(read/write methods), so makefile() just returns object itself. TODO: this
doesn't take care of arguments CPython's makefile() may accept.
11 years ago
Paul Sokolovsky
21c51f0bde
ffi: Fix mp_obj_str_get_data() return type.
11 years ago
Paul Sokolovsky
1e19b24ea0
io.File, socket types: Add fileno() method.
Implementation is duplicated, but tolerate this for now, because there's
no clear idea how to de-dup it.
11 years ago
Paul Sokolovsky
9945f33886
Rename "rawsocket" module to "microsocket".
It's no longer intended to provide just "raw" socket interface, may include
some convenience methods for compatibility with CPython socket - but anyway
just minimal set required to deal with socket client and servers, not wider
network functionality.
11 years ago
Damien George
7d0bfbedd2
py: Add some qstrs to the global table.
11 years ago
Damien George
0a587b85fb
py: Pass keyword args to native functions by using the stack.
Passing keyword arguments to a native function now no longer requires
heap memory. The kw_args map is created on the stack using the args
array as the table.
11 years ago
Damien George
9a58d760c3
py: Allow mp_map_t to be initialised by a fixed-size, const table.
This allows keyword maps to be created directly from stack data.
11 years ago
Damien George
698ec21e46
Make mp_obj_str_get_data return char* instead of byte*.
Can't decide which is better for string type, char or byte pointer.
Changing to char removes a few casts. Really need to do proper unicode.
11 years ago
Damien George
23177088d2
stm: Mount SD card on 1:/ if present.
If SD card is present on (soft) reset then it's mounted on 1:/ and files
can be openned using, eg, open('1:/test.txt', 'r'), or 'w' for writing.
11 years ago
Damien George
aea532ece1
py: Put builtins into ROM table.
Linear table at the moment, to eventually be replaced with a hash table
generated by a preprocessor.
Dynamic table is retained so that builtins can be overridden.
11 years ago
Damien George
354d15a964
Implement fixed buffer vstrs; use them for import path.
11 years ago
Damien George
64131f3215
Add staticmethod and classmethod to builtin namespace.
11 years ago