summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2015-10-19py: Add lsl/lsr/asr opcode support to inline Thumb2 assembler.Damien George
2015-10-18py/stream: Allow to reuse is_nonblocking_error().Paul Sokolovsky
2015-10-17py: Add support for _ in REPL to hold last computed value.Damien George
Only available when MICROPY_CAN_OVERRIDE_BUILTINS is enabled.
2015-10-16py: Add option for inline assembler to support ARMv7-M instructions.Damien George
Cortex-M0, M0+ and M1 only have ARMv6-M Thumb/Thumb2 instructions. M3, M4 and M7 have a superset of these, named ARMv7-M. This patch adds a config option to enable support of the superset of instructions.
2015-10-15py: Fix with+for+return bug by popping for-iter when unwinding exc stack.Damien George
Addresses issue #1182.
2015-10-15py: Remove dependency on printf/fwrite in mp_plat_print.Damien George
See issue #1500.
2015-10-14py/compile: Remove unnecessary label in compilation of for statement.Damien George
2015-10-14py: Fix build of ARM native emitter due to recent viper changes.Damien George
Addresses #1510.
2015-10-13py/qstr: Fix calc of qstr memory usage, due to new qstr chunk allocation.Damien George
2015-10-13py: Implement ptr32 load and store in viper emitter.Damien George
2015-10-12py: Add support to call __init__ from a builtin module on first import.Damien George
2015-10-12py: Allow to to build MicroPython as a static library.Paul Sokolovsky
The whole current port gets slurped into a static lib named "libmicropython.a". Maybe that's not ideal, but at least something to start with.
2015-10-12py/parse: Make parser error handling cleaner, less spaghetti-like.Damien George
2015-10-12py: Move constant folding from compiler to parser.Damien George
It makes much more sense to do constant folding in the parser while the parse tree is being built. This eliminates the need to create parse nodes that will just be folded away. The code is slightly simpler and a bit smaller as well. Constant folding now has a configuration option, MICROPY_COMP_CONST_FOLDING, which is enabled by default.
2015-10-12py/objarray: Allow to create array of void pointers, as extension to CPython.Paul Sokolovsky
Using 'P' format specifier (matches struct module). This is another shortcut for FFI, just as previously introduced "array of objects" ('O').
2015-10-11py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.Paul Sokolovsky
2015-10-11py/makeqstrdata.py: Catch and report case of empty input file.Paul Sokolovsky
The usual cause would be that a cross-compiler for a port is not in PATH.
2015-10-08py/parse: Factor logic when creating parse node from and-rule.Damien George
2015-10-08py: Don't generate unnecessary parse nodes for assignment or kwargs.Damien George
This patch eliminates the need for a nested parse node for assignments and keyword arguments. It saves a little bit of RAM when parsing.
2015-10-08py/emitnative: Raise ViperTypeError for unsupported unary ops.Damien George
2015-10-08py/compile: Fix edge case when constant-folding negation of integer.Damien George
Also adds tests specifically for testing constant folding.
2015-10-06modussl: SSL socket wrapper module based on axTLS.Paul Sokolovsky
2015-10-03py: Allow to enable inline assembler without native emitter.Damien George
2015-10-02py: Allocate parse nodes in chunks to reduce fragmentation and RAM use.Damien George
With this patch parse nodes are allocated sequentially in chunks. This reduces fragmentation of the heap and prevents waste at the end of individually allocated parse nodes. Saves roughly 20% of RAM during parse stage.
2015-10-01py: Catch all cases of integer (big and small) division by zero.Damien George
2015-10-01py/mpz: Fix bignum anding of large negative with smaller positive int.Damien George
2015-10-01py/mpz: Force rhs of mpz_shl_inpl/mpz_shr_inpl to be unsigned.Damien George
Python semantics are that rhs of shift must be non-negative, so there's no need to handle negative values in the underlying mpz implementation.
2015-10-01py/mpz: Raise NotImplError instead of failing assertion.Damien George
2015-10-01py/parsenum: Provide detailed error for int parsing with escaped bytes.Damien George
This patch adds more fine grained error message control for errors when parsing integers (now has terse, normal and detailed). When detailed is enabled, the error now escapes bytes when printing them so they can be more easily seen.
2015-09-28py/objrange: Bugfix for range_subscr() when index is a slice object.Tom Soulanille
2015-09-24py/compile: Put compiler state on the C stack.Damien George
It's relatively small (between 44 and 56 bytes) and helps to reduce heap pressure and fragmentation during compilation.
2015-09-23py: Slightly simplify compile and emit of star/double-star arguments.Damien George
Saves a few bytes of code space and eliminates need for rot_two bytecode (hence saving RAM and execution time, by a tiny bit).
2015-09-23py: Fix call args when a stararg is followed by keyword args.Delio Brignoli
2015-09-19py/repl: Treat escaped quotes correctly in REPL continuation.Alex March
Escaped quotes are now recognised correctly in REPL when used inside normal quotes. Fixes: #1419
2015-09-15py/objslice: Fix indent.Tom Soulanille
2015-09-15py/objslice: Make slice attributes (start/stop/step) readable.Tom Soulanille
Configurable with MICROPY_PY_BUILTINS_SLICE_ATTRS. Disabled by default.
2015-09-15py/mpz: Fix calculation of max digit storage for mpz; fix sys.maxsize.Damien George
When creating constant mpz's, the length of the mpz must be exactly how many digits are used (not allocated) otherwise these numbers are not compatible with dynamically allocated numbers. Addresses issue #1448.
2015-09-12lib/mp-readline: Add auto-indent support.Damien George
4 spaces are added at start of line to match previous indent, and if previous line ended in colon. Backspace deletes 4 space if only spaces begin a line. Configurable via MICROPY_REPL_AUTO_INDENT. Disabled by default.
2015-09-11stmhal: fix single precision float printing errorDave Hylands
Fixes #1435.
2015-09-07py/lexer: Properly classify floats that look like hex numbers.Damien George
Eg 0e0 almost looks like a hex number but in fact is a float.
2015-09-07py/lexer: Raise SyntaxError when unicode char point out of range.Damien George
2015-09-07py/lexer: Raise NotImplError for unicode name escape, instead of assert.Damien George
2015-09-07py/compile: Refine SyntaxError for repeated use of global/nonlocal.Damien George
2015-09-04py: Eliminate some cases which trigger unused parameter warnings.Damien George
2015-09-04py/objstr: Check for keyword args before checking for no posn args.Damien George
Otherwise something like bytes(abc=123) will succeed.
2015-09-04py/objstr: For str.endswith(s, start) raise NotImpl instead of assert.Damien George
2015-09-04py/objbool: Simplify dispatch of bool binary op.Damien George
This optimises (in speed and code size) for the common case where the binary op for the bool object is supported. Unsupported binary ops still behave the same.
2015-09-04py/compile: Only compile function annotations if really needed.Damien George
Function annotations are only needed when the native emitter is enabled and when the current scope is emitted in viper mode. All other times the annotations can be skipped completely.
2015-09-03stmhal: add option to query for the current usb modeTony Abboud
Fetch the current usb mode and return a string representation when pyb.usb_mode() is called with no args. The possible string values are interned as qstr's. None will be returned if an incorrect mode is set.
2015-09-03py: Use mp_not_implemented consistently for not implemented features.Damien George