summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* py: Change qstr_* functions to use size_t as the type for str len arg.Damien George2015-11-29
|
* py: Change mp_print_strn_t func type to use size_t for the str length.Damien George2015-11-29
|
* py/asmx86: Fix function definition to use int32_t instead of int.Damien George2015-11-27
|
* py/binary: Make use of MP_ALIGN.Damien George2015-11-27
|
* py/mpconfig.h: Allow to build without alloca() for ANSI C compliance.Paul Sokolovsky2015-11-25
| | | | | Define MICROPY_NO_ALLOCA=1 and memory will be allocated from heap instead and freed by garbage collection.
* extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.Paul Sokolovsky2015-11-25
|
* extmod: Move fsusermount.c from stmhal for cross-port reuse.Paul Sokolovsky2015-11-25
|
* windows/py: Support 64bit mingw-w64 buildsstijn2015-11-24
| | | | | | | | - add mp_int_t/mp_uint_t typedefs in mpconfigport.h - fix integer suffixes/formatting in mpconfig.h and mpz.h - use MICROPY_NLR_SETJMP=1 in Makefile since the current nlrx64.S implementation causes segfaults in gc_free() - update README
* nlr: Use single preprocessor symbol to check if building on Windowsstijn2015-11-24
|
* py/compile: Do proper checking of * and ** in function definition.Damien George2015-11-23
| | | | | This patch checks that there is only one *, and that ** is last in the arg list.
* py: Check that second argument to hasattr is actually a string.Damien George2015-11-23
| | | | Fixes issue #1623.
* py/emitglue: Implement persistent saving and loading of const objects.Damien George2015-11-23
|
* py/emitglue: Add feature-flag header to .mpy to detect bytecode compat.Damien George2015-11-23
| | | | | Loading .mpy files will now check to make sure that the target VM can support the bytecode.
* py/mpz: Normalize (remove leading zeros) xor operation result.Paul Sokolovsky2015-11-22
|
* py/formatfloat: Handle calculation of integer digit for %f format properly.Paul Sokolovsky2015-11-22
| | | | | %f prints true integer digit, so its calculation should happen before any exponential scaling.
* py/formatfloat: Workaround (fix?) incorrect rounding for %f format.Paul Sokolovsky2015-11-22
|
* py/formatfloat: Convert to fully portable implementation.Paul Sokolovsky2015-11-22
| | | | | | | | | | | This takes previous IEEE-754 single precision float implementation, and converts it to fully portable parametrizable implementation using C99 functions like signbit(), isnan(), isinf(). As long as those functions are available (they can be defined in adhoc manner of course), and compiler can perform standard arithmetic and comparison operations on a float type, this implementation will work with any underlying float type (including types whose mantissa is larger than available intergral integer type).
* py/emitglue: Host definition of mp_verbose_flag.Paul Sokolovsky2015-11-21
| | | | | This may not seem like the ideal place, but is actually the only place in py/ where it gets referenced, so is just right.
* py/modsys: Consistently use indented #if's.Paul Sokolovsky2015-11-21
|
* py: Use MP_OBJ_NULL instead of NULL when appropriate.Damien George2015-11-20
|
* py/emitglue: Add mp_raw_code_load_mem to load raw-code from memory.Damien George2015-11-20
|
* py/emitglue: Only compile raw-code fatfs loader when on thumb2 platform.Damien George2015-11-20
| | | | | | Here we are assuming that a thumb2 port will have fatfs, which is only roughly true. We need a better way of enabling specific raw-code file readers.
* py/compile: Add mp_compile_to_raw_code() to return raw code object.Damien George2015-11-20
| | | | This can then be passed to mp_raw_code_save_file to save a .mpy file.
* py: Added Cygwin support to py/nlrx86.S.Igor Gatis2015-11-19
|
* py/map: Store key/value in earliest possible slot in hash table.Damien George2015-11-19
| | | | | | | | This change makes the code behave how it was supposed to work when first written. The avail_slot variable is set to the first free slot when looking for a key (which would come from deleting an entry). So it's more efficient (for subsequent lookups) to insert a new key into such a slot, rather than the very last slot that was searched.
* py/mpstate: Make mp_pending_exception volatile.Damien George2015-11-17
| | | | It can change asynchronously.
* py/modmath: Make log2, log10 and hyperbolic funcs be SPECIAL_FUNCTIONS.Damien George2015-11-17
| | | | | | Will be included only when MICROPY_PY_MATH_SPECIAL_FUNCTIONS is enabled. Also covers cmath module (but only log10 is there at the moment).
* py: Implement default and star args for lambdas.Damien George2015-11-17
|
* py/compile: Don't unnecessarily save state when compiling param list.Damien George2015-11-17
| | | | | Parameter lists can't be nested so there is no need to save the global state when compiling them.
* py/modmath: Don't create symbol entry for expm1() if not needed.Paul Sokolovsky2015-11-14
|
* py/modmath: Make expm1() be in MICROPY_PY_MATH_SPECIAL_FUNCTIONS.Paul Sokolovsky2015-11-14
|
* unix/mpconfigport: Move log2() definition to modmath.c.Paul Sokolovsky2015-11-13
| | | | | It's safer to define it where it's used, defining it for all source files may lead to hard to diagnose conflicts in corner cases.
* py: Allow to import compiled bytecode files.Damien George2015-11-13
|
* py: Add MICROPY_PERSISTENT_CODE_LOAD/SAVE to load/save bytecode.Damien George2015-11-13
| | | | | | MICROPY_PERSISTENT_CODE must be enabled, and then enabling MICROPY_PERSISTENT_CODE_LOAD/SAVE (either or both) will allow loading and/or saving of code (at the moment just bytecode) from/to a .mpy file.
* py: Add MICROPY_PERSISTENT_CODE so code can persist beyond the runtime.Damien George2015-11-13
| | | | | | | | | | | Main changes when MICROPY_PERSISTENT_CODE is enabled are: - qstrs are encoded as 2-byte fixed width in the bytecode - all pointers are removed from bytecode and put in const_table (this includes const objects and raw code pointers) Ultimately this option will enable persistence for not just bytecode but also native code.
* py: Add constant table to bytecode.Damien George2015-11-13
| | | | | Contains just argument names at the moment but makes it easy to add arbitrary constants.
* py: Put all bytecode state (arg count, etc) in bytecode.Damien George2015-11-13
|
* py: Reorganise bytecode layout so it's more structured, easier to edit.Damien George2015-11-13
|
* py/emitinlinethumb: Allow to compile with -Wsign-compare.Damien George2015-11-09
|
* py/asmthumb: Allow to compile with -Wsign-compare and -Wunused-parameter.Damien George2015-11-09
|
* py/objint_longlong: Instead of assert, throw OverflowError.Paul Sokolovsky2015-11-09
|
* py: Clear finalizer flag when calling gc_free.Dave Hylands2015-11-07
| | | | | | | | | | | Currently, the only place that clears the bit is in gc_collect. So if a block with a finalizer is allocated, and subsequently freed, and then the block is reallocated with no finalizer then the bit remains set. This could also be fixed by having gc_alloc clear the bit, but I'm pretty sure that free is called way less than alloc, so doing it in free is more efficient.
* py: Adjust object repr C (30-bit stuffed float) to reduce code size.Damien George2015-11-06
| | | | | | | | | | This patch adds/subtracts a constant from the 30-bit float representation so that str/qstr representations are favoured: they now have all the high bits set to zero. This makes encoding/decoding qstr strings more efficient (and they are used more often than floats, which are now slightly less efficient to encode/decode). Saves about 300 bytes of code space on Thumb 2 arch.
* all: Add py/mphal.h and use it in all ports.Damien George2015-10-31
| | | | | | py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
* py/modstruct: Support repetition counters for all types, not just string.Paul Sokolovsky2015-10-31
| | | | | | | This makes format specifiers ~ fully compatible with CPython. Adds 24 bytes for stmhal port (because previosuly we had to catch and report it's unsupported to user).
* py: In inline asm, vldr and vstr offsets now in bytes not words.adminpete2015-10-31
| | | | As per ARM convention.
* py/makeversionhdr.py: Work with backslashes in paths.omtinez2015-10-30
| | | | | This script may be called by Windows IDEs (e.g. Visual Studio) and be passed paths with backslashes.
* extmod/modlwip: slip: Use stream protocol and be port-independent.Paul Sokolovsky2015-10-27
| | | | | Based on the original patch by Galen Hazelwood: https://github.com/micropython/micropython/pull/1517 .
* Makefiles: Remove duplicate object files when linking.Paul Sokolovsky2015-10-24
| | | | | | | | | | | Scenario: module1 depends on some common file from lib/, so specifies it in its SRC_MOD, and the same situation with module2, then common file from lib/ eventually ends up listed twice in $(OBJ), which leads to link errors. Make is equipped to deal with such situation easily, quoting the manual: "The value of $^ omits duplicate prerequisites, while $+ retains them and preserves their order." So, just use $^ consistently in all link targets.
* py/nlrthumb: Make compatible with Cortex-M0 (ARMv6M instr set).Damien George2015-10-20
|