summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
...
* | py: Fix __len__ special method result handling.Paul Sokolovsky2014-05-11
| | | | | | | | Having both MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL is arguably confusing.
* | py: Don't expect that type->getiter() always returns iterator, check for NULL.Paul Sokolovsky2014-05-11
| | | | | | | | This is better than forcing each getiter() implementation to raise exception.
* | showbc: Decode MAP_ADD.Paul Sokolovsky2014-05-11
| |
* | py: Add basic implementation of hasattr() function.Paul Sokolovsky2014-05-11
| |
* | py: Use mp_arg_check_num in more places.Damien George2014-05-11
| | | | | | | | | | | | | | | | | | Updated functions now do proper checking that n_kw==0, and are simpler because they don't have to explicitly raise an exception. Down side is that the error messages no longer include the function name, but that's acceptable. Saves order 300 text bytes on x64 and ARM.
* | py: frozenset() creates an empty frozenset.Damien George2014-05-11
| |
* | py: Rename globally-accessible tuple functions, prefix with mp_obj_.Damien George2014-05-11
| | | | | | | | | | Likely there are other functions that should be renamed, but this is a start.
* | py: Rename some unichar functions for consistency.Damien George2014-05-11
| |
* | py: Rename MICROPY_SYS_EXIT to MICROPY_MOD_SYS_EXIT.Damien George2014-05-11
| | | | | | | | For consistency with MICROPY_MOD_SYS_STDFILES, etc.
* | py: Give up and make mp_obj_str_get_data() deal with bytes too.Paul Sokolovsky2014-05-11
| | | | | | | | | | | | This is not fully correct re: error handling, because we should check that that types are used consistently (only str's or only bytes), but magically makes lot of functions support bytes.
* | objstr: Make *strip() accept bytes.Paul Sokolovsky2014-05-11
| |
* | objtuple: Go out of the way to support comparison of subclasses.Paul Sokolovsky2014-05-11
| | | | | | | | | | | | | | | | | | | | | | Two things are handled here: allow to compare native subtypes of tuple, e.g. namedtuple (TODO: should compare type too, currently compared duck-typedly by content). Secondly, allow user sunclasses of tuples (and its subtypes) be compared either. "Magic" I did previously in objtype.c covers only one argument (lhs is many), so we're in trouble when lhs is native type - there's no other option besides handling rhs in special manner. Fortunately, this patch outlines approach with fast path for native types.
* | py: Don't try to "bind" types store as attributes of objects.Paul Sokolovsky2014-05-11
| | | | | | | | | | | | | | | | This was hit when trying to make urlparse.py from stdlib run. Took quite some time to debug. TODO: Reconsile bound method creation process better, maybe callable is to generic type to bind at all?
* | objstr: Make .[r]partition() work with bytes.Paul Sokolovsky2014-05-11
| |
* | objboundmeth: If detailed reporting enabled, print object content.Paul Sokolovsky2014-05-11
| | | | | | | | Similar to closure and cell.
* | py: Start making good use of mp_const_obj_t.Paul Sokolovsky2014-05-11
| |
* | objlist: Support list slice deletion.Paul Sokolovsky2014-05-10
| |
* | objlist: Implement non-growing slice assignment.Paul Sokolovsky2014-05-10
| | | | | | | | Slice value to assign can be only a list so far too.
* | py: Fix prefix on few sequence helpers, was incorrectly "mp_".Paul Sokolovsky2014-05-10
| |
* | objtype: Comments for duplicating code in runtime.c.Paul Sokolovsky2014-05-10
| |
* | objtype: Implement ->getiter() method for instances.Paul Sokolovsky2014-05-10
| | | | | | | | Includes support for native bases.
* | py: Make mp_obj_print() handle null object w/o segfault if debug build.Paul Sokolovsky2014-05-10
| | | | | | | | Happens regularly when used for debugging.
* | objnamedtuple: Support iteration.Paul Sokolovsky2014-05-10
| |
* | py: Compress a little the bytecode emitter structure.Damien George2014-05-10
| |
* | py, emitters: Fix dummy_data size for bytecode and thumb.Damien George2014-05-10
| | | | | | | | | | | | | | Thumb uses a bit less RAM, bytecode uses a tiny bit more, to avoid overflow of the dummy buffer in certain cases. Addresses issue #599.
* | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-05-10
|\ \
| * | objstr: Implement .lower() and .upper().Paul Sokolovsky2014-05-10
| | |
* | | py, lexer: Add allocation policy config; return NULL if can't allocate.Damien George2014-05-10
|/ /
* | py: Improve handling of memory error in parser.Damien George2014-05-10
| | | | | | | | | | | | | | | | | | | | | | Parser shouldn't raise exceptions, so needs to check when memory allocation fails. This patch does that for the initial set up of the parser state. Also, we now put the parser object on the stack. It's small enough to go there instead of on the heap. This partially addresses issue #558.
* | builtinimport: Fix broken namespace imports due to dup vstr_cut_tail_bytes().Paul Sokolovsky2014-05-10
| |
* | builtinimport: Fix comment orphaned by one of previous commits.Paul Sokolovsky2014-05-10
| |
* | modsys: Enable sys.exit() per port after all.Paul Sokolovsky2014-05-10
| |
* | modsys, unix: Add sys.exit(), should be implemented by a port.Paul Sokolovsky2014-05-10
| |
* | py: Disable frozenset by default, enable on unix.Paul Sokolovsky2014-05-10
| | | | | | | | Takes 416 text bytes on x86.
* | objset: Give up and implement frozenset.Paul Sokolovsky2014-05-10
| | | | | | | | Tired of patching CPython stdlib for it.
* | objtype: Don't treat inheritance from "object" as from native type.Paul Sokolovsky2014-05-10
| | | | | | | | | | | | | | | | | | | | | | "object" type in MicroPython currently doesn't implement any methods, and hopefully, we'll try to stay like that for as long as possible. Even if we have to add something eventually, look up from there might be handled in adhoc manner, as last resort (that's not compliant with Python3 MRO, but we're already non-compliant). Hence: 1) no need to spend type trying to lookup anything in object; 2) no need to allocate subobject when explicitly inheriting from object; 3) and having multiple bases inheriting from object is not a case of incompatible multiple inheritance.
* | py: Tidy up returning NULL which should be MP_OBJ_NOT_SUPPORTED.Damien George2014-05-10
| |
* | py: Combine native emitters to 1 glue function; distinguish viper.Damien George2014-05-10
| | | | | | | | | | | | | | | | This patch simplifies the glue between native emitter and runtime, and handles viper code like inline assember: return values are converted to Python objects. Fixes issue #531.
* | py: Rename byte_code to bytecode everywhere.Damien George2014-05-10
| | | | | | | | bytecode is the more widely used. See issue #590.
* | py: Fix base "detection" for int('0<hexdigit>', 16).Paul Sokolovsky2014-05-10
| |
* | bytes: Implement comparison and other binary operations.Paul Sokolovsky2014-05-10
| | | | | | | | Should support everything supported by strings.
* | runtime0.h: Group binary ops by fives.Paul Sokolovsky2014-05-10
| | | | | | | | So one has some chance to convert numeric op code into symbol.
* | windows: Add modtime implementationstijn2014-05-09
| |
* | Add gc.enable, gc.disable; remove pyb.gc.Damien George2014-05-08
| |
* | Merge pull request #568 from stinos/windows-msvc-portPaul Sokolovsky2014-05-09
|\ \ | | | | | | Windows MS Visual C port
| * | Windows MSVC portstijn2014-05-08
| |/ | | | | | | Extend the windows port so it compiles with the toolchain from Visual Studio 2013
* / py, compiler: Add basic support for A=const(123).Damien George2014-05-08
|/ | | | | | | | | | | You can now do: X = const(123) Y = const(456 + X) and the compiler will replace X and Y with their values. See discussion in issue #266 and issue #573.
* py: Fix stack access in thumb native emitter.Damien George2014-05-07
|
* py: Fix emitcpy, to work with latest changes to PASS variables.Damien George2014-05-07
|
* py: Improve native emitter; now supports more opcodes.Damien George2014-05-07
|