Paul Sokolovsky
ac736f15c9
stream: Factor out mp_stream_write() method to write a memstring to stream.
2014-07-13 23:14:32 +03:00
Paul Sokolovsky
564e46452d
py: Add generic helper to align a pointer.
2014-07-12 15:57:28 +03:00
Paul Sokolovsky
58c9586c34
emitbc: Fix structure field alignment issue.
...
dummy_data field is accessed as uint value (e.g.
in emit_write_bytecode_byte_ptr), but is not aligned as such, which causes
bus errors or incorrect behavior on any arch requiring strictly aligned
data (ARM pre-v7, MIPS, etc, etc).
2014-07-12 15:57:28 +03:00
Paul Sokolovsky
2097c8b1e1
moductypes: Add symbolic constants to specify bitfield position/length.
2014-07-11 00:06:36 +03:00
Paul Sokolovsky
8215847b4d
moductypes: Foreign data interface module, roughly based on ctype ideas.
...
But much smaller and memory-efficient. Uses Python builtin data structures
(dict, tuple, int) to describe structure layout.
2014-07-09 19:28:24 +03:00
Paul Sokolovsky
5fa5ca40e6
binary: Factor out mp_binary_set_int().
2014-07-05 23:54:03 +03:00
Damien George
0182385ab0
py: Automatically ake __new__ a staticmethod.
...
Addresses issue #622 .
2014-07-05 05:55:00 +01:00
Paul Sokolovsky
4e0eeebdc2
py: Implement sys.maxsize, standard way to check platform "bitness".
...
Implementing it as a static constant is a bit peculiar and require cooperation
from long int implementation.
2014-07-03 18:09:36 +03:00
Damien George
381618269a
parser: Convert (u)int to mp_(u)int_t.
2014-07-03 14:13:33 +01:00
Damien George
54eb4e723e
lexer: Convert type (u)int to mp_(u)int_t.
2014-07-03 13:47:47 +01:00
Damien George
40f3c02682
Rename machine_(u)int_t to mp_(u)int_t.
...
See discussion in issue #50 .
2014-07-03 13:25:24 +01:00
Damien George
7a37f647a5
Merge branch 'teensy-new' of github.com:dhylands/micropython into dhylands-teensy-new
...
Conflicts:
stmhal/pin_named_pins.c
stmhal/readline.c
Renamed HAL_H to MICROPY_HAL_H. Made stmhal/mphal.h which intends to
define the generic Micro Python HAL, which in stmhal sits above the ST
HAL.
2014-07-02 13:42:37 +01:00
Damien George
f0b29729aa
py, objexcept: Only check for locked gc if gc is enabled.
2014-07-01 14:28:09 +01:00
Damien George
f065344d3b
Merge branch 'preserve-except' of github.com:dhylands/micropython into dhylands-preserve-except
2014-07-01 14:26:37 +01:00
Dave Hylands
2fe841d2fa
Try not to cause a MemoryError when raising an exception during nterrupt handling.
...
Step 1 fixes #732
2014-06-30 22:49:21 -07:00
Paul Sokolovsky
caa7334141
stackctrl: Add "mp_" prefix.
2014-07-01 02:14:08 +03: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
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
9e215fa4c2
py: Make unichar_charlen() accept/return machine_uint_t.
2014-06-28 23:15:29 +03:00
Damien George
8546ce1e28
py: Add missing #endif.
2014-06-28 10:29:22 +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
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