summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* py, vm: Where possible, make variables local to each opcode.Damien George2014-05-25
| | | | | | | | | 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.
* py: Slightly improve efficiency of mp_obj_new_str; rename str_new.Damien George2014-05-25
| | | | | | Reorder interning logic in mp_obj_new_str, to be more efficient. str_new is globally accessible, so should be prefixed with mp_obj_.
* Change const byte* to const char* where sensible.Damien George2014-05-25
| | | | | This removes need for some casts (at least, more than it adds need for new casts!).
* Merge branch 'pfalcon-keep-strings-uninterned'Damien George2014-05-25
|\
| * py: Don't automatically intern strings in parser.Damien George2014-05-25
| | | | | | | | | | | | | | | | 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.
| * Merge branch 'keep-strings-uninterned' of github.com:pfalcon/micropython ↵Damien George2014-05-25
| |\ | | | | | | | | | | | | | | | | | | into pfalcon-keep-strings-uninterned Conflicts: py/parse.c
| | * Draft approach towards resolving ↵Paul Sokolovsky2014-05-08
| | | | | | | | | | | | https://github.com/micropython/micropython/issues/560#issuecomment-42213955
* | | objlist: Implement support for arbitrary (3-arg) slices.Paul Sokolovsky2014-05-25
| | |
* | | py: Refactor slice helpers, preparing to support arbitrary slicing.Paul Sokolovsky2014-05-25
|/ /
* | sequence: Throw exception for not implemented slice steps.Paul Sokolovsky2014-05-25
| |
* | objlist: Implement growing slice assignment.Paul Sokolovsky2014-05-25
| | | | | | | | | | This means that complete slice operations are supported for lists (but not for bytearray's and array.array's).
* | py: Handle case of slice start > stop in common sequence function.Paul Sokolovsky2014-05-25
| |
* | objslice: Support arbitrary objects start, stop, and step.Paul Sokolovsky2014-05-25
| | | | | | | | | | Older int-only encoding is not expressive enough to support arbitrary slice assignment operations.
* | Add SystemExit exception and use it in unix/ and stmhal/ ports.Damien George2014-05-24
| | | | | | | | Addresses issue #598.
* | Rename configuration variables controling Python features.Damien George2014-05-24
| | | | | | | | Now of the form MICROPY_PY_*. See issue #35.
* | objstr: Implement .endswith().Paul Sokolovsky2014-05-24
| |
* | unix modsocket: Make .makefile() method more compliant.Paul Sokolovsky2014-05-24
| | | | | | | | | | .makefile() should allow to specify which stream time to create - byte or text.
* | py: Initial attempts to actually allow implementing __new__ in Python.Paul Sokolovsky2014-05-22
| | | | | | | | | | Caveat is that __new__ should recurse to base class __new__, and ultimately, object.__new__ is what handles instance allocation.
* | objobject: Fix arguments to __init__().Paul Sokolovsky2014-05-21
| |
* | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-05-21
|\ \
| * | objtype: super: Fall back to "object" lookup as last resort.Paul Sokolovsky2014-05-21
| | | | | | | | | | | | | | | Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520.
| * | objtype: super: Add stop condition for looking up in base types.Paul Sokolovsky2014-05-21
| | |
* | | Tidy up some configuration options.Damien George2014-05-21
|/ / | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #607 from Anton-2/osx-clangDamien George2014-05-21
|\ \ | | | | | | Allow compilation of unix port under clang on OS X
| * | Fix some unused variables, and silence a clang warning about initialization ↵Antonin ENFRUN2014-05-12
| | | | | | | | | | | | override in vmentrytable.h
| * | unix: Create __bss_start and _end symbols for Mach-O targets.Antonin ENFRUN2014-05-12
| | | | | | | | | | | | It's a hack, but can't find a cleaner way to do it.
* | | py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.Damien George2014-05-21
| | | | | | | | | | | | See issue #608 for justification.
* | | modstruct: struct_calcsize: Fix case of uninitialized var.Paul Sokolovsky2014-05-20
| | |
* | | py: Implement proper separation between io.FileIO and io.TextIOWrapper.Paul Sokolovsky2014-05-19
| | | | | | | | | | | | | | | | | | | | | io.FileIO is binary I/O, ans actually optional. Default file type is io.TextIOWrapper, which provides str results. CPython3 explicitly describes io.TextIOWrapper as buffered I/O, but we don't have buffering support yet anyway.
* | | objexcept: Implement explicit __init__ method, useful for subclasses.Paul Sokolovsky2014-05-19
| | |
* | | objtype: Separate __new__ and __init__ methods.Paul Sokolovsky2014-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now schedule is: for native types, we call ->make_new() C-level method, which should perform actions of __new__ and __init__ (note that this is not compliant, but is efficient), but for user types, __new__ and __init__ are called as expected. Also, make sure we convert scalar attribute value to a bound-pair tight in mp_obj_class_lookup() method, which avoids converting it again and again in its callers.
* | | py: Fix mp_obj_t -> mp_const_obj_t for mp_obj_int_get_checked()Sven Wegener2014-05-17
| | | | | | | | | | | | Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* | | py: More mp_identity usage.Paul Sokolovsky2014-05-17
| | |
* | | py: More const usage.Paul Sokolovsky2014-05-17
| | |
* | | objstr: startswith(): Accept optional "start" arg.Paul Sokolovsky2014-05-15
| | |
* | | py: Implement more complete bytes comparison handling.Paul Sokolovsky2014-05-15
| | |
* | | sequence: Fix yet another case of improper sequence comparison.Paul Sokolovsky2014-05-15
| | | | | | | | | | | | This time, in mp_seq_cmp_bytes(). How many more cases are still lurking?
* | | objstringio: Implement io.BytesIO.Paul Sokolovsky2014-05-15
| | | | | | | | | | | | | | | Done in generalized manner, allowing any stream class to be specified as working with bytes.
* | | objstr.c: Partial implementation of .rsplit().Paul Sokolovsky2014-05-14
| | | | | | | | | | | | sep=None is TODO.
* | | py: Improve mpz_and function.Damien George2014-05-13
| | | | | | | | | | | | This should now have correct (and optimal) behaviour.
* | | py, unix: Add copyright for modules I worked closely on.Paul Sokolovsky2014-05-13
| | |
* | | py: Fix bug in mpz_and function.Damien George2014-05-12
| | | | | | | | | | | | Addresses issue #610.
* | | py: Remove emit_glue init and deinit. Needed only for debugging.Damien George2014-05-12
| | | | | | | | | | | | | | | Debugging output for emit_glue now simplified so that the init and deinit functions are no longer needed.
* | | py: Add support for __debug__ constant.Damien George2014-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | __debug__ now resolves to True or False. Its value needs to be set by mp_set_debug(). TODO: call mp_set_debug in unix/ port. TODO: optimise away "if False:" statements in compiler.
* | | py: Rename BYTE_CODE to BYTECODE (this was missed in previous rename).Damien George2014-05-12
| | |
* | | modstruct: Implement count specifier for strings (e.g. "100s").Paul Sokolovsky2014-05-12
|/ / | | | | | | Infra for counts of other types is there, need last mile to be implemented.
* | modstruct: Use MP_OBJ_FUN_ARGS_MAX instead of -1.v1.0.1Paul Sokolovsky2014-05-11
| |
* | objstr: Slice indexing: support bytes properly.Paul Sokolovsky2014-05-11
| |
* | objstr: Make .split() support bytes.Paul Sokolovsky2014-05-11
| |
* | objstr: Make .join() support bytes.Paul Sokolovsky2014-05-11
| |