summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2015-03-01py: Set compiler scope before folding constants so error messages work.Damien George
Addresses issue #1140.
2015-02-28py: Combine complie functions for or_test/and_test to reduce code size.Damien George
Saves around 60 bytes code on Thumb2 archs.
2015-02-28py: Combine emit functions for jump true/false to reduce code size.Damien George
Saves 116 bytes for stmhal and 56 bytes for cc3200 port.
2015-02-28py: Combine logic for compiling and/or tests, to reduce code size.Damien George
Reduces code size by 72 bytes on Thumb2 archs.
2015-02-27objarray: Implement array slice assignment.Paul Sokolovsky
This is rarely used feature which takes enough code to implement, so is controlled by MICROPY_PY_ARRAY_SLICE_ASSIGN config setting, default off. But otherwise it may be useful, as allows to update arbitrary-sized data buffers in-place. Slice is yet to implement, and actually, slice assignment implemented in such a way that RHS of assignment should be array of the exact same item typecode as LHS. CPython has it more relaxed, where RHS can be any sequence of compatible types (e.g. it's possible to assign list of int's to a bytearray slice). Overall, when all "slice write" features are implemented, it may cost ~1KB of code.
2015-02-27py: Transform assert logic in compiler to save code space.Damien George
Saves about 250 code bytes for Thumb2 archs.
2015-02-27py: Use m_{new,renew,del} consistently.Damien George
This is so all memory requests go through the same interface.
2015-02-27py: Fix adding of traceback so that it appends to existing info.Damien George
This makes exception traceback info self contained (ie doesn't rely on list object, which was a bit of a hack), reduces code size, and reduces RAM footprint of exception by eliminating the list object. Addresses part of issue #1126.
2015-02-26py: Small optimisation of logic flow in BC_WITH_CLEANUP bytecode.Damien George
Slightly smaller code, and does not need to use C stack to save temporaries.
2015-02-25py: Make inline assembler raise exception when branch not in range.Damien George
Addresses issue #1132.
2015-02-24py: In inline assembler, add return statement to fix flow logic.Damien George
2015-02-24py: Factor some code in inline thumb assembler to reduce code size.Damien George
2015-02-24py: Make more asmthumb functions inline to reduce code size.Damien George
2015-02-24py: Reduce code size of inline thumb assembler by using static tables.Damien George
Reduces stmhal by about 300 bytes ROM.
2015-02-23py: Update parse.c&mpconfig.h to reflect rename of mp_lexer_show_token.nhtshot
This function is only used when DEBUG_PRINTERS and USE_RULE_NAME are enabled.
2015-02-23py: Implement UnicodeError.Paul Sokolovsky
Still too shy to implement UnicodeEncodeError which was really needed for micropython-lib case.
2015-02-22py: Make math special functions configurable and disabled by default.Damien George
The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
2015-02-22py: Add few more special methods.Paul Sokolovsky
2015-02-21py: Expose mp_obj_list_remove as a public function.Damien George
2015-02-17py: Fix mp_obj_print() to work when Python streams are not used.Paul Sokolovsky
2015-02-17py: Revamp mp_obj_print() to use Python streams.Paul Sokolovsky
Most of printing infrastructure now uses streams, but mp_obj_print() used libc's printf(), which led to weird buffering issues in output. So, switch mp_obj_print() to streams too, even though it may make sense to move it to a separate file, as it is purely a debugging function now.
2015-02-16py: Implement bl/bx instructions for inline Thumb assembler.Damien George
2015-02-16py: Implement "it" instruction for inline Thumb assembler.Damien George
2015-02-16py: More robust checking in inline assembler compiler.Damien George
2015-02-16builtinimport: Revamp&refactor handling of relative imports.Paul Sokolovsky
Relative imports are based of a package, so we're currently at a module within a package, we should get to package first. Also, factor out path travsering operation, but this broke testing for boundary errors with relative imports. TODO: reintroduce them, together with proper tests.
2015-02-16builtinimport: Improve debugging output.Paul Sokolovsky
2015-02-15stackctrl: Encode "recursion depth exceeded" message as qstr.Paul Sokolovsky
So corresponding exception can be thrown even under tight memory conditions.
2015-02-15objexcept: Optimize traceback allocation for exception.Paul Sokolovsky
Traceback allocation for exception will now never lead to recursive MemoryError exception - if there's no memory for traceback, it simply won't be created.
2015-02-15objexcept: Optimize using messages without formatting substitutions.Paul Sokolovsky
They are directly cast to str object, skipping allocation of formatting buffer.
2015-02-15nlr: Add even more optional debugging logging.Paul Sokolovsky
Has to be enabled by manual editing, but at least it's there, as debugging NLR issues may be weird.
2015-02-15nlr: If DEBUG, guard against recursive nlr_push().Paul Sokolovsky
Pushing same NLR record twice would lead to "infinite loop" in nlr_jump (but more realistically, it will crash as soon as NLR record on stack is overwritten).
2015-02-15py: Make old_globals part of mp_code_state structure.Paul Sokolovsky
Conceptually it is part of code state, so let it be allocated in the same way as the rest of state.
2015-02-15py: Use TextIOWrapper only if PY_IO_FILEIO def'd; cast size_t for print.Damien George
2015-02-15py: Simplify and remove redundant code for __iter__ method lookup.Damien George
2015-02-15py: Fix loading of immediate pointer in Thumb assembler.Damien George
Addresses issue #1117.
2015-02-15py: Check for valid file when creating lexer for execfile.Damien George
Addresses issue #1119.
2015-02-14py: Cleanup duplication in instance_is_callable/instance_call.stijn
2015-02-14py: Add setattr builtin.stijn
2015-02-14py/asm*.c: Typo fixes in comments.Paul Sokolovsky
2015-02-13py: Implement clz and rbit for inline Thumb assembler.Damien George
2015-02-13py: Implement sdiv/udiv for inline Thumb assembler.Damien George
2015-02-13py: Implement push/pop for inline Thumb assembler.Damien George
2015-02-13py: Expose compile.c:list_get as mp_parse_node_extract_list.Damien George
2015-02-13py: Make inline assembler raise proper SyntaxError exception on error.Damien George
Also gives line number of location of error. Very useful!
2015-02-12py: Add ldrex and strex to thumb2 inline assembler.Damien George
These are useful for implementing atomic lock operations.
2015-02-10py: Reuse value stack in VM WITH_CLEANUP opcode to reduce C-stack size.Damien George
Saves 8 bytes C-stack on stmhal and 16 bytes on unix x86.
2015-02-10py: Add option to micropython.qstr_info() to dump actual qstrs.Damien George
2015-02-09py: Don't unnecessarily create a bound method.Damien George
2015-02-09py: Allow subclass of native object to delegate to the native buffer_p.Damien George
Addresses issue #1109.
2015-02-09py: Remove obsolete MP_F_LOAD_CONST_{INT,DEC} from emitnative.c.Damien George