Damien George
25c84643b6
py: Fix break from within a for loop.
Needed to pop the iterator object when breaking out of a for loop. Need
also to be careful to unwind exception handler before popping iterator.
Addresses issue #635 .
11 years ago
Paul Sokolovsky
8827682b35
objstr: *strip(): If nothing is stripped, don't create dup string.
11 years ago
Paul Sokolovsky
bcdffe53c6
objstr: *strip(): Fix handling of one-char subject strings.
11 years ago
Paul Sokolovsky
059f95b2cb
Merge pull request #633 from stinos/msvc-fix-genhdr-dep
msvc: Only update generated headers when there are changes
11 years ago
Paul Sokolovsky
97953f6ce7
qemu-arm: Add port README.
Based on https://github.com/micropython/micropython/pull/630 by @errordeveloper .
11 years ago
Damien George
f55cf10101
py: Implement bignum '&' with negatives on lhs and rhs.
Needs proper coverage testing. Doesn't implement -ve & -ve.
Addresses issue #611 .
11 years ago
stijn
48d641e41a
msvc: Only update generated headers when there are changes
This fixes generating the headers casuing complete rebuilds,
even when the headere's content didn't really change.
11 years ago
Damien George
d1e355ea8e
py: Fix check of small-int overflow when parsing ints.
Also unifies use of SMALL_INT_FITS macro across parser and runtime.
11 years ago
Damien George
813ed3bda6
py: Make int(<longint>) work by just returning the longint.
11 years ago
Damien George
503d611033
py: Implement long int parsing in int(...).
Addresses issue #627 .
11 years ago
Paul Sokolovsky
1d567592b1
unix/gccollect.c: Make Clang workaround apply only to it. Unbreaks gcc builds.
11 years ago
Paul Sokolovsky
168a9ce863
Revert "Fix DEBUG=1 builds"
This reverts commit 6e76f7bc90
.
This patch tries to workaround a previous clang workaround. Instead of going
into workaround of workaround spiral, the original workaround should be tamed.
11 years ago
Damien George
ae13758dd7
Merge pull request #631 from stinos/fix-win-def
windows: Complete rename of MICROPY_PATH_MAX to MICROPY_ALLOC_PATH_MAX (...
11 years ago
Damien George
4de2fe10b4
Merge pull request #629 from dhylands/fix-unix-debug
Fix unix DEBUG=1 builds
11 years ago
stijn
34c24a0fc2
windows: Complete rename of MICROPY_PATH_MAX to MICROPY_ALLOC_PATH_MAX ( 58ebde4
)
11 years ago
Dave Hylands
6e76f7bc90
Fix DEBUG=1 builds
Without this fix, I get the following error:
CC gccollect.c
gccollect.c: In function ‘gc_helper_get_regs’:
gccollect.c:63:1: error: bp cannot be used in asm here
11 years ago
Paul Sokolovsky
0405b2210d
modos: stat(): Accept bytes argument.
11 years ago
Paul Sokolovsky
d07bf029b7
tests: Add small testcase for 3-arg slices.
11 years ago
Damien George
d8675541a9
py, vm: Where possible, make variables local to each opcode.
This helps the compiler do its optimisation, makes it clear which
variables are local per opcode and which global, and makes it consistent
when extra variables are needed in an opcode (in addition to old obj1,
obj2 pair, for example).
Could also make unum local, but that's for another time.
11 years ago
Damien George
f600a6a085
py: Slightly improve efficiency of mp_obj_new_str; rename str_new.
Reorder interning logic in mp_obj_new_str, to be more efficient.
str_new is globally accessible, so should be prefixed with mp_obj_.
11 years ago
Damien George
2617eebf2f
Change const byte* to const char* where sensible.
This removes need for some casts (at least, more than it adds need
for new casts!).
11 years ago
Damien George
f88fc7bd23
Merge branch 'pfalcon-keep-strings-uninterned'
11 years ago
Damien George
5042bce8fb
py: Don't automatically intern strings in parser.
This completes non-automatic interning of strings in the parser, so that
doc strings don't take up RAM. It complicates the parser and compiler,
and bloats stmhal by about 300 bytes. It's complicated because now
there are 2 kinds of parse-nodes that can be strings: interned leaves
and non-interned structs.
11 years ago
Paul Sokolovsky
5fd5af98d0
objlist: Implement support for arbitrary (3-arg) slices.
11 years ago
Paul Sokolovsky
de4b9329f9
py: Refactor slice helpers, preparing to support arbitrary slicing.
11 years ago
Damien George
3aaabd11a0
Merge branch 'keep-strings-uninterned' of github.com:pfalcon/micropython into pfalcon-keep-strings-uninterned
Conflicts:
py/parse.c
11 years ago
Paul Sokolovsky
ff4b6daa4f
sequence: Throw exception for not implemented slice steps.
11 years ago
Paul Sokolovsky
2705f4c782
objlist: Implement growing slice assignment.
This means that complete slice operations are supported for lists (but not
for bytearray's and array.array's).
11 years ago
Paul Sokolovsky
69d081a7cf
py: Handle case of slice start > stop in common sequence function.
11 years ago
Paul Sokolovsky
afaaf535e6
objslice: Support arbitrary objects start, stop, and step.
Older int-only encoding is not expressive enough to support arbitrary slice
assignment operations.
11 years ago
Damien George
7a4ddd2428
Add SystemExit exception and use it in unix/ and stmhal/ ports.
Addresses issue #598 .
11 years ago
Damien George
ee3fd46f13
Rename configuration variables controling Python features.
Now of the form MICROPY_PY_*. See issue #35 .
11 years ago
Paul Sokolovsky
d0ceb04b90
modsocket: 64-bit cleanness.
11 years ago
Paul Sokolovsky
d098c6bf85
objstr: Implement .endswith().
11 years ago
Paul Sokolovsky
561789d718
unix modsocket: Make .makefile() method more compliant.
.makefile() should allow to specify which stream time to create - byte
or text.
11 years ago
Paul Sokolovsky
806ea1f6ca
py: Initial attempts to actually allow implementing __new__ in Python.
Caveat is that __new__ should recurse to base class __new__, and ultimately,
object.__new__ is what handles instance allocation.
11 years ago
Paul Sokolovsky
0c937fa25a
objobject: Fix arguments to __init__().
11 years ago
Damien George
efaef6eea3
unix: Fix casting issue, int to small int object.
11 years ago
Damien George
90886807a1
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
58ebde4664
Tidy up some configuration options.
MP_ALLOC_* -> MICROPY_ALLOC_*
MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX
MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL
MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX
MICROPY_EXTRA_* -> MICROPY_PORT_*
See issue #35 .
11 years ago
Paul Sokolovsky
a8408a8abe
objtype: super: Fall back to "object" lookup as last resort.
Also, define object.__init__() (semantically empty, purely CPython compat
measure). Addresses #520 .
11 years ago
Paul Sokolovsky
6a410789b8
objtype: super: Add stop condition for looking up in base types.
11 years ago
Damien George
aa7cf6f72f
stm: Remove long-obsolete stm/ port.
11 years ago
Damien George
63436ce22e
unix, Mac support: Generate order.def via Makefile.
11 years ago
Damien George
0fd01683c6
Merge pull request #607 from Anton-2/osx-clang
Allow compilation of unix port under clang on OS X
11 years ago
Damien George
6ac5dced24
py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.
See issue #608 for justification.
11 years ago
Damien George
6d197740cf
stmhal: Stop USB before entering DFU by software.
11 years ago
Paul Sokolovsky
008343f640
Merge pull request #621 from stinos/migw-w64-fix
windows: Fix compilation with mingw-w64 so it uses correct printf implem...
11 years ago
Paul Sokolovsky
053765414c
modstruct: struct_calcsize: Fix case of uninitialized var.
11 years ago
stijn
32acd4b9f1
windows: Fix compilation with mingw-w64 so it uses correct printf implementations
Without this flag, mingw-w64 uses the MS implementations of snpintf and the likes.
This is not really a problem since they work with the the fixes provided for msvc,
but due to the way mingw-w64's stdio.h is structured we cannot get it to use the fixes.
11 years ago