mux
5d44e6a92c
Add copysignf
...
* Fix #692
2014-06-30 16:31:06 +02:00
Damien George
4039a26679
Merge pull request #710 from iabdalkader/assert
...
Fix assert_func warning/error
2014-06-30 09:09:24 +01:00
Damien George
b601d9574a
py: Improvements to native emitter.
...
Native emitter can now compile try/except blocks using nlr_push/nlr_pop.
It probably only works for 1 level of exception handling. It doesn't
work on Thumb (only x64).
Native emitter can also handle some additional op codes.
With this patch, 198 tests now pass using "-X emit=native" option to
micropython.
2014-06-30 05:17:25 +01:00
Paul Sokolovsky
5813efd634
stmhal: pyb.adc: Clarify that buffer with elements of any size can be used.
...
Based on forum post: http://forum.micropython.org/viewtopic.php?f=6&t=193
2014-06-29 21:34:58 +03:00
Paul Sokolovsky
bb35f425f9
Merge pull request #730 from stinos/windows-mpconfig
...
windows: Sync mpconfigport.h with the unix' version
2014-06-29 20:50:16 +03:00
Paul Sokolovsky
c10a4405cd
gendoc.py: Support modules w/o functions and/or classes.
...
I.e. don't assume that both are always present.
2014-06-29 15:48:30 +03:00
Paul Sokolovsky
a23475979b
modffi: Support short types.
2014-06-29 15:48:21 +03:00
stijn
ec6fa8732b
windows: Sync mpconfigport.h with the unix' version
...
- rearrange/add definitions that were not there so it's easier to compare both
- use MICROPY_PY_SYS_PLATFORM in main.c since it's available anyway
- define EWOULDBLOCK, it is missing from ingw32
2014-06-29 09:40:20 +02:00
Paul Sokolovsky
8139494e54
stmhal: Include mpconfig.h before all other includes.
...
It defines types used by all other headers.
Fixes #691 .
2014-06-28 23:32:03 +03:00
Paul Sokolovsky
9e215fa4c2
py: Make unichar_charlen() accept/return machine_uint_t.
2014-06-28 23:15:29 +03:00
Paul Sokolovsky
a62da515af
Merge pull request #729 from stinos/fix-include-order
...
unix: Fix mpconfig.h not being included before misc.h
2014-06-28 23:12:39 +03:00
stijn
5478ed18ea
unix: Fix mpconfig.h not being included before misc.h
...
This fixes count_lead_ones in misc.h not compiling due to unknown types
2014-06-28 20:49:39 +02:00
Damien George
b1b840554d
Merge branch 'unicode'
2014-06-28 10:30:53 +01:00
Damien George
635b60e299
unix, stmhal: Add option for STR_UNICODE to mpconfigport.h.
...
Unicode is disabled by default for now, since FileIO.read(n) is
currently not implemented for text-mode files, and this is an
often function.
2014-06-28 10:29:52 +01:00
Damien George
8546ce1e28
py: Add missing #endif.
2014-06-28 10:29:22 +01:00
Damien George
41736f8201
tests: Write output in byte mode, not text mode.
...
This enables testing unicode and non-unicode implementations.
2014-06-28 10:29:12 +01:00
Damien George
e04a44e2f6
py: Small comments, name changes, use of machine_int_t.
2014-06-28 10:27:23 +01:00
Damien George
b3a50f0f3e
Merge branch 'master' into unicode
...
Conflicts:
py/mpconfig.h
2014-06-28 10:27:15 +01:00
Paul Sokolovsky
8993fb6cf0
py: Add protection against printing too nested or recursive data structures.
...
With a test which cannot be automatically validated so far.
2014-06-28 02:25:04 +03:00
Paul Sokolovsky
7e4ec3bf4f
bare-arm: Hint of setting MICROPY_ERROR_REPORTING to REPORTING_TERSE.
...
Commented out so far, as enabled leads to dozen more bytes used actually
(due to string pooling effects).
2014-06-27 21:02:04 +03:00
Paul Sokolovsky
81df1e6c98
bare-arm: Disable array module and even bytearray type.
...
To squeeze few more hundreds of bytes.
2014-06-27 21:02:04 +03:00
Paul Sokolovsky
cb78f862cb
py: Allow to disable array module and bytearray type.
...
array.array and bytearray share big deal of code, so to get real savings,
both need to be disabled.
2014-06-27 21:02:04 +03:00
Paul Sokolovsky
0a1ea40273
bare-arm: Enable link map file.
...
This port supposed to be demo of uPy minimality, so let people behold it in
details.
2014-06-27 21:02:04 +03:00
Paul Sokolovsky
8a96ebea75
py: Move stack_ctrl_init() to mp_init().
...
As stack checking is enabled by default, ports which don't call
stack_ctrl_init() are broken now (report RuntimeError on startup). Save
them trouble and just init stack control framework in interpreter init.
2014-06-27 21:02:04 +03:00
Paul Sokolovsky
64c58403ef
Merge pull request #720 from iabdalkader/mcu_name
...
Change MCU name config micro
2014-06-27 18:24:32 +03:00
mux
a75e382a9b
Change MCU name config micro
2014-06-27 00:35:53 +02:00
Paul Sokolovsky
3c8ce38d20
Merge pull request #717 from stinos/dead-code
...
unix: Remove unused CTRL-D definition
2014-06-27 01:23:18 +03:00
Paul Sokolovsky
3659af97c5
Merge pull request #703 from iabdalkader/micro_names
...
Add MICROPY_HW_MICRO_NAME to boards config
2014-06-27 01:19:17 +03:00
Paul Sokolovsky
ed07d035d5
tests: Add basic test for unicode file i/o.
2014-06-27 00:04:20 +03:00
Paul Sokolovsky
f5f6c3b792
streams: Reading by char count from unicode text streams is not implemented.
2014-06-27 00:04:20 +03:00
Paul Sokolovsky
ce81312d8a
misc: Add count_lead_ones() function, useful for UTF-8 handling.
2014-06-27 00:04:20 +03:00
Paul Sokolovsky
63143c94ce
tests: Test for explicit start/end args to str methods for unicode.
2014-06-27 00:04:20 +03:00
Paul Sokolovsky
ea2c936c7e
objstrunicode: Refactor str_index_to_ptr() following objstr.
2014-06-27 00:04:20 +03:00
Paul Sokolovsky
26fda6dc8e
objstr: 64-bit issues.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
00c904b47a
objstrunicode: Signedness issues.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
1044c3dfe6
unicode: Make get_char()/next_char()/charlen() be 8-bit compatible.
...
Based on config define.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
b1949e4c09
tests: Add tests for unicode find()/rfind()/index().
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
5048df0b7c
objstr: find(), rfind(), index(): Make return value be unicode-aware.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
46d31e9ca9
unicode: Add utf8_ptr_to_index().
...
Useful when we have pointer to char inside string, but need to return char
index. (E.g. str.find()).
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
ded0fc77f7
py: Add dedicated unicode header.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
17994d1bd3
tests: Add test for unicode string iteration.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
79b7fe2ee5
objstrunicode: Implement iterator.
2014-06-27 00:04:19 +03:00
Paul Sokolovsky
cdc020da4b
objstrunicode: Re-add buffer protocol back for now, required for io.StringIO.
2014-06-27 00:04:18 +03:00
Paul Sokolovsky
e7f2b4c875
objstrunicode: Revamp len() handling for unicode, and optimize bool().
2014-06-27 00:04:18 +03:00
Paul Sokolovsky
86d3898e70
objstrunicode: Get rid of bytes checking, it's separate type.
2014-06-27 00:04:18 +03:00
Paul Sokolovsky
d215ee1dc1
py: Make MICROPY_PY_BUILTINS_STR_UNICODE=1 buildable.
2014-06-27 00:04:18 +03:00
Paul Sokolovsky
9731912ccb
py: Prune unneeded code from objstrunicode, reuse code in objstr.
2014-06-27 00:04:18 +03:00
Paul Sokolovsky
165eb69b86
vstr: Restore bytestr compatibility.
2014-06-27 00:04:18 +03:00
Paul Sokolovsky
42a52516fe
builtin: Restore bytestr compatibility.
2014-06-27 00:04:18 +03:00
Chris Angelico
2ba2299d28
lexer, vstr: Add unicode support.
2014-06-27 00:04:18 +03:00