418 Commits (de5a9d72dcdaacdd5048195cd5bab007f4b2baef)

Author SHA1 Message Date
Paul Sokolovsky 4a60cac916 runtime: Add TODO for mp_resume() on handling .close().
8 years ago
Paul Sokolovsky 4ed7b7f751 py: iternext() may not return MP_OBJ_NULL, only MP_OBJ_STOP_ITERATION.
8 years ago
Damien George 044c473de2 py: Add %q format support to mp_[v]printf, and use it.
8 years ago
Damien George b1bbe966c4 py: Combine load_attr and store_attr type methods into one (attr).
8 years ago
Damien George 12a5e17afb py: Add finer configuration of static funcs when not in stackless mode.
8 years ago
Paul Sokolovsky e6c6fe3275 runtime: Split mp_call_prepare_args_n_kw_var() from mp_call_method_n_kw_var().
8 years ago
Damien George 55b74d1ff5 py: Combine duplicated code that converts members from a lookup.
8 years ago
Paul Sokolovsky 07b8dc68d6 runtime: mp_load_method_maybe(): Don't use confusing "base" term.
8 years ago
Paul Sokolovsky e104acdb8c runtime: Typo fixes in comments.
8 years ago
Damien George f6532bb9e0 py: Simplify and remove redundant code for __iter__ method lookup.
8 years ago
Damien George 7d414a1b52 py: Parse big-int/float/imag constants directly in parser.
8 years ago
Damien George 0bfc7638ba py: Protect mp_parse and mp_compile with nlr push/pop block.
8 years ago
Damien George a5efcd4745 py: Specify unary/binary op name in TypeError error message.
8 years ago
Damien George 50912e7f5d py, unix, stmhal: Allow to compile with -Wshadow.
8 years ago
Damien George 963a5a3e82 py, unix: Allow to compile with -Wsign-compare.
8 years ago
Damien George b4b10fd350 py: Put all global state together in state structures.
8 years ago
Damien George 51dfcb4bb7 py: Move to guarded includes, everywhere in py/ core.
8 years ago
Damien George b063b9b36d py: Fix iteration over map in 2 places.
8 years ago
Damien George 78d702c300 py: Allow builtins to be overridden.
8 years ago
Damien George a4c52c5a3d py: Optimise lexer by exposing lexer type.
8 years ago
Damien George 1e9a92f84f py: Use shorter, static error msgs when ERROR_REPORTING_TERSE enabled.
8 years ago
Paul Sokolovsky 039887a0ac py: Fix bug with right-shifting small ints by large amounts.
8 years ago
Damien George 124df6f8d0 py: Add mp_pending_exception global variable, for VM soft interrupt.
8 years ago
Damien George c9fc620723 py: Implement compile builtin, enabled only on unix port.
8 years ago
Paul Sokolovsky e5a3759ff5 py: Factor out mp_obj_is_package() function.
8 years ago
Damien George 3aa09f5784 py: Use MP_OBJ_NULL instead of NULL in a few places.
8 years ago
Damien George 4091445612 py: Add #if guard around gc-specific code.
8 years ago
Dave Hylands 3556e45711 Allow real memory errors (from locked gc) to be reported with traceback.
8 years ago
Damien George c4d0868df1 py: Implement proper context save/restore for eval/exec; factor code.
8 years ago
Damien George 39dc145478 py: Change [u]int to mp_[u]int_t in qstr.[ch], and some other places.
8 years ago
Damien George 4bcd04bcad py: Tidy up exception matching; allow matching of tuple of exceptions.
8 years ago
Damien George b0261341d3 py: For malloc and vstr functions, use size_t exclusively for int type.
8 years ago
Damien George eaaebf3291 stmhal: Initialise stack pointer correctly.
9 years ago
Damien George ca6d75f16d py: Small simplifications in tuple and list accessors.
9 years ago
Damien George 4abff7500f py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.
9 years ago
Damien George d182b98a37 py: Change all uint to mp_uint_t in obj.h.
9 years ago
Damien George 9c4cbe2ac0 py: Make tuple and list use mp_int_t/mp_uint_t.
9 years ago
Damien George 110ba35980 py: Move native glue code from runtime.c to new file nativeglue.c.
9 years ago
Damien George 7fe2191c9b py: Code clean-up in native emitter; improve thumb native calls.
9 years ago
Damien George 86de21b810 py: Viper can call functions with native types, and raise exceptions.
9 years ago
Damien George e6c0dff967 py: Viper can now store to global.
9 years ago
Damien George 8dbbbbc793 Put call to qstr_init and mp_init_emergency_exc_buf in mp_init.
9 years ago
Damien George 40f3c02682 Rename machine_(u)int_t to mp_(u)int_t.
9 years ago
Paul Sokolovsky caa7334141 stackctrl: Add "mp_" prefix.
9 years ago
Paul Sokolovsky 8a96ebea75 py: Move stack_ctrl_init() to mp_init().
9 years ago
Paul Sokolovsky 3b6f7b95eb py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT.
9 years ago
Damien George df896eceef Merge branch 'alloca' of github.com:marcusva/micropython into marcusva-alloca
9 years ago
Paul Sokolovsky 7e4a2b0edc py: Add generic mp_not_implemented() func to use instead of assert().
9 years ago
Marcus von Appen 0c90eb1658 - FreeBSD provides alloca() via stdlib.h, in contrast to Linux and Windows
9 years ago
Chris Angelico daf973ae00 Change comments (mainly URLs) to no longer specifically say Python 3.3
9 years ago
Damien George 3f52262465 py: Allow tail call optimisation in mp_call_function_n_kw.
9 years ago
Paul Sokolovsky d3439d0c60 py: Instead of having "debug on" var, have "optimization level" var.
9 years ago
Damien George c49ddb9315 py: Fix configurability of builtin slice.
9 years ago
Damien George 3ebd4d0cae py: Add option to disable set() object (enabled by default).
9 years ago
Damien George fb510b3bf9 Rename bultins config variables to MICROPY_PY_BUILTINS_*.
9 years ago
Damien George d1e355ea8e py: Fix check of small-int overflow when parsing ints.
9 years ago
Damien George 503d611033 py: Implement long int parsing in int(...).
9 years ago
Damien George 6ac5dced24 py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.
9 years ago
Damien George 915197a8f9 py: Remove emit_glue init and deinit. Needed only for debugging.
9 years ago
Damien George 97f9a2813e py: Add support for __debug__ constant.
9 years ago
Paul Sokolovsky c48d6f7add py: Don't expect that type->getiter() always returns iterator, check for NULL.
9 years ago
Paul Sokolovsky 9511f60f01 py: Don't try to "bind" types store as attributes of objects.
9 years ago
Paul Sokolovsky d915a52eb6 py: Fix prefix on few sequence helpers, was incorrectly "mp_".
9 years ago
stijn 5ed284a15e windows: Add modtime implementation
9 years ago
stijn 01d6be4d51 Windows MSVC port
9 years ago
Damien George a32c1e41cc py: Improve native emitter; now supports more opcodes.
9 years ago
Damien George 36db6bcf54 py, compiler: Improve passes; add an extra pass for native emitter.
9 years ago
Damien George 04b9147e15 Add license header to (almost) all files.
9 years ago
stijn 72521a1c17 mingw: Fix number of exponent digits in floating point formatting
9 years ago
Paul Sokolovsky f54bcbf099 py, unix: Make "mpconfig.h" be first included, as other headers depend on it.
9 years ago
Paul Sokolovsky 755565d2cb py: Support instance __call__ method.
9 years ago
Paul Sokolovsky 599bbc111c py: from import * should not import symbols starting with underscore.
9 years ago
Damien George ea8d06c39d py: Add MP_OBJ_STOP_ITERATION and make good use of it.
9 years ago
Damien George 729f7b42d6 py: Merge BINARY_OP_SUBSCR and store_subscr (w/ delete) into subscr.
9 years ago
Damien George 8bcb9861a7 py: Don't assert but go to unsupported_op in mp_binary_op for small int.
9 years ago
Damien George 640e7e4779 Merge pull request #476 from pfalcon/static-sys
9 years ago
Damien George df8127a17e py: Remove unique_codes from emitglue.c. Replace with pointers.
9 years ago
Paul Sokolovsky 5500cdeec7 py, unix: Convert sys module to static representation.
9 years ago
Damien George f7e4e1c2b4 py: Fix compiler warning when floats disabled.
9 years ago
Paul Sokolovsky 42453dc98e py: Make ImportError message match CPython's.
9 years ago
Paul Sokolovsky 69f1867da5 builtinimport: Fix thinko passing 0 vs NULL.
9 years ago
Paul Sokolovsky af620abcb5 py: Implement "from pkg import mod" variant of import.
9 years ago
Damien George ae491055fa py: Fix float/complex binop returning NULL; implement complex power.
9 years ago
Damien George f4c9b33abf py: Remove DELETE_SUBSCR opcode, combine with STORE_SUBSCR.
9 years ago
Damien George 1d24ea5207 py: Finish implementation of all del opcodes.
9 years ago
Damien George 495d781a36 py: implement UNPACK_EX byte code (for: a, *b, c = d)
9 years ago
Damien George cdd96dff2c py: Implement more features in native emitter.
9 years ago
Paul Sokolovsky 36dd19ae27 py: Revert mp_load_attr() to its previous state (not supporting default val).
9 years ago
Damien George 7efc5b3f34 py: Make globals and locals proper dictionary objects.
9 years ago
Damien George 8b0535e23f py: Change module globals from mp_map_t* to mp_obj_dict_t*.
9 years ago
Damien George ea13f407a3 py: Change nlr_jump to nlr_raise, to aid in debugging.
9 years ago
Damien George 23419a2f8a Merge pull request #433 from pfalcon/getattr-3arg
9 years ago
Damien George 66edc5d899 py: Implement DELETE_SUBSCR bytecode; implement mp_obj_dict_delete.
9 years ago
Paul Sokolovsky bfb7d6a26d py: Support 3-arg getattr() builtin (with default value).
9 years ago
Paul Sokolovsky c6813d92db py: Put default namespace into module __main__.
9 years ago
Paul Sokolovsky a0d32991ed mp_load_name(): Optimize for outer scope where locals == globals.
9 years ago
Damien George ecf5b77123 py: This time, real proper overflow checking of small int power.
9 years ago
Damien George 6902eeda25 py: Add m_malloc_fail function to handle memory allocation error.
9 years ago
Damien George 5bf565e353 py: Handle small int power overflow correctly.
9 years ago
Damien George 70f33cde48 py: Fix up so that it can compile without float.
9 years ago
Damien George e44d26ae0c py: Implement __getattr__.
9 years ago
Paul Sokolovsky 6ce78c4fae py: Wrap .__class__ handling in MICROPY_CPYTHON_COMPAT.
9 years ago
Damien George 43e92cfb52 Merge branch 'master' of github.com:micropython/micropython
9 years ago
Damien George 15d18069c5 py: Remove old "run time" functions that were 1 liners.
9 years ago
Paul Sokolovsky 7da0660516 mp_resume: Dare to pass send_value of NULL.
9 years ago
Paul Sokolovsky a2109d9321 mp_resume: Elaborate handling of .throw() for objects which lack it.
9 years ago
Damien George 1aa2c10263 Merge branch 'master' of github.com:micropython/micropython
9 years ago
Damien George 523b575039 py: Add LOAD_NULL bytecode and use it to simplify function calls.
9 years ago
Paul Sokolovsky 6ded55a61f py: Properly implement divide-by-zero handling.
9 years ago
Paul Sokolovsky f39d3b93da py: Implement support for generalized generator protocol.
9 years ago
Damien George 230fec77d7 py: Implement positional and keyword args via * and **.
9 years ago
Damien George df6567e634 Merge map.h into obj.h.
9 years ago
Damien George d17926db71 Rename rt_* to mp_*.
9 years ago
Damien George 3e1a5c10c5 py: Rename old const type objects to mp_type_* for consistency.
9 years ago
Damien George 07ddab529c py: Change mp_const_* objects to macros.
9 years ago
Damien George 440f041525 py: Fix bugs with debugging output.
9 years ago
Damien George 2326d52d20 py: Factor out code from runtime.c to emitglue.c.
9 years ago
Damien George bee17b00e3 py: Put n_state for bytecode in the bytecode prelude.
9 years ago
Damien George d6f9434091 Merge pull request #381 from pfalcon/closure-defargs
9 years ago
Damien George c3f1126ee8 py: Fix logic bugs in object attribute/method extraction.
9 years ago
Damien George 9b196cddab Remove mp_obj_type_t.methods entry and use .locals_dict instead.
9 years ago
Paul Sokolovsky 2447a5b582 py: Support closures with default args.
9 years ago
Damien George c12b2213c1 Change mp_method_t.name from const char * to qstr.
9 years ago
Damien George 66eaf84b8c py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.
9 years ago
Damien George 9e6e935df0 py: Add support for user-defined iterators via __iter__, __next__.
9 years ago
Damien George caac542b23 Proper support for registering builtin modules in ROM.
9 years ago
Paul Sokolovsky 7f8b31345b rt_load_method(): Add missing qstr_str() when getting type name.
9 years ago
Paul Sokolovsky f909034400 py: Implement support for "except Exception as var" clause.
9 years ago
Paul Sokolovsky 4b2b7ceca7 runtime: RT_BINARY_OP_EXCEPTION_MATCH: don't fall thru in case of wrong types.
9 years ago
Damien George c91097223d py: Remove some unnecessary exception objects.
9 years ago
Damien George 3ec0a1a32d py: Add 'object' object.
9 years ago
Rachel Dowdall 56402796d8 Fixed floor division on mp ints and small ints. Added a floordivide test case.
9 years ago
Rachel Dowdall cde8631f15 Fixed modulo operator on ints and mp ints to agree with python. Added intdivmod.c and tests/basics/modulo.py.
9 years ago
Rachel Dowdall 721c55dced Added exception hierarchy except for OSError and UnicodeError (requires arguments). Comment out the errors that aren't needed if memory becomes an issue.
9 years ago
Rachel Dowdall 17f45d41fe Merge remote-tracking branch 'upstream/master'
9 years ago
Paul Sokolovsky 1ecea7c753 py: Make 'bytes' be a proper type, support standard constructor args.
9 years ago
Paul Sokolovsky be020c27a8 py: Make 'str' be a proper type, support standard constructor args.
9 years ago
Damien George 6e48f7fa85 py: Allow 'complex()' to take a string as first argument.
9 years ago
Damien George c06ea7abf2 py: Implement parsing of infinity and nan for floats.
9 years ago
Rachel Dowdall 300c8bd4c2 Added ZeroDivisionError to float division.
9 years ago
xbe efe3422394 py: Clean up includes.
9 years ago
Damien George 9d68e9ccdd py: Implement integer overflow checking for * and << ops.
9 years ago
Damien George 0ec6bd47cb py: Fix printing of type name.
9 years ago
Damien George 0c36da0b59 Implement ROMable modules. Add math module.
9 years ago
Damien George 715101580b py: Factor and improve issubclass.
9 years ago
Paul Sokolovsky d08fd68664 Add basic collections.namedtuple implementation.
9 years ago
Damien George 41eb6086b7 py: Remove more var arg names fro macros with var args.
9 years ago
Damien George 510477557d py: Take out bitfield entries from their own structure.
9 years ago
Damien George 2077397118 py: Put number parsing code together in parsenum.c.
9 years ago
Paul Sokolovsky ac2e28c654 Support passing positional args as keywords to bytecode functions.
9 years ago