aboutsummaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2015-12-02py/mpprint: Printing of doubles is now supported (by uPy own routine).fabien.lementec
2015-11-29py: Add support for 64-bit NaN-boxing object model, on 32-bit machine.Damien George
To use, put the following in mpconfigport.h: #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_D) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE) typedef int64_t mp_int_t; typedef uint64_t mp_uint_t; #define UINT_FMT "%llu" #define INT_FMT "%lld" Currently does not work with native emitter enabled.
2015-11-29py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George
This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
2015-11-29py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George
2015-11-29py/gc: Move away from using mp_uint_t, instead use uintptr_t and size_t.Damien George
The GC works with concrete pointers and so the types should reflect this.
2015-11-29py: Use uintptr_t instead of mp_uint_t in MP_TAGPTR_* macros.Damien George
2015-11-29py: Make mp_setup_code_state take concrete pointer for func arg.Damien George
2015-11-29py/emit: Change type of arg of load_const_obj from void* to mp_obj_t.Damien George
2015-11-29py: Change qstr_* functions to use size_t as the type for str len arg.Damien George
2015-11-29py: Change mp_print_strn_t func type to use size_t for the str length.Damien George
2015-11-27py/asmx86: Fix function definition to use int32_t instead of int.Damien George
2015-11-27py/binary: Make use of MP_ALIGN.Damien George
2015-11-25py/mpconfig.h: Allow to build without alloca() for ANSI C compliance.Paul Sokolovsky
Define MICROPY_NO_ALLOCA=1 and memory will be allocated from heap instead and freed by garbage collection.
2015-11-25extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.Paul Sokolovsky
2015-11-25extmod: Move fsusermount.c from stmhal for cross-port reuse.Paul Sokolovsky
2015-11-24windows/py: Support 64bit mingw-w64 buildsstijn
- 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
2015-11-24nlr: Use single preprocessor symbol to check if building on Windowsstijn
2015-11-23py/compile: Do proper checking of * and ** in function definition.Damien George
This patch checks that there is only one *, and that ** is last in the arg list.
2015-11-23py: Check that second argument to hasattr is actually a string.Damien George
Fixes issue #1623.
2015-11-23py/emitglue: Implement persistent saving and loading of const objects.Damien George
2015-11-23py/emitglue: Add feature-flag header to .mpy to detect bytecode compat.Damien George
Loading .mpy files will now check to make sure that the target VM can support the bytecode.
2015-11-22py/mpz: Normalize (remove leading zeros) xor operation result.Paul Sokolovsky
2015-11-22py/formatfloat: Handle calculation of integer digit for %f format properly.Paul Sokolovsky
%f prints true integer digit, so its calculation should happen before any exponential scaling.
2015-11-22py/formatfloat: Workaround (fix?) incorrect rounding for %f format.Paul Sokolovsky
2015-11-22py/formatfloat: Convert to fully portable implementation.Paul Sokolovsky
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).
2015-11-21py/emitglue: Host definition of mp_verbose_flag.Paul Sokolovsky
This may not seem like the ideal place, but is actually the only place in py/ where it gets referenced, so is just right.
2015-11-21py/modsys: Consistently use indented #if's.Paul Sokolovsky
2015-11-20py: Use MP_OBJ_NULL instead of NULL when appropriate.Damien George
2015-11-20py/emitglue: Add mp_raw_code_load_mem to load raw-code from memory.Damien George
2015-11-20py/emitglue: Only compile raw-code fatfs loader when on thumb2 platform.Damien George
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.
2015-11-20py/compile: Add mp_compile_to_raw_code() to return raw code object.Damien George
This can then be passed to mp_raw_code_save_file to save a .mpy file.
2015-11-19py: Added Cygwin support to py/nlrx86.S.Igor Gatis
2015-11-19py/map: Store key/value in earliest possible slot in hash table.Damien George
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.
2015-11-17py/mpstate: Make mp_pending_exception volatile.Damien George
It can change asynchronously.
2015-11-17py/modmath: Make log2, log10 and hyperbolic funcs be SPECIAL_FUNCTIONS.Damien George
Will be included only when MICROPY_PY_MATH_SPECIAL_FUNCTIONS is enabled. Also covers cmath module (but only log10 is there at the moment).
2015-11-17py: Implement default and star args for lambdas.Damien George
2015-11-17py/compile: Don't unnecessarily save state when compiling param list.Damien George
Parameter lists can't be nested so there is no need to save the global state when compiling them.
2015-11-14py/modmath: Don't create symbol entry for expm1() if not needed.Paul Sokolovsky
2015-11-14py/modmath: Make expm1() be in MICROPY_PY_MATH_SPECIAL_FUNCTIONS.Paul Sokolovsky
2015-11-13unix/mpconfigport: Move log2() definition to modmath.c.Paul Sokolovsky
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.
2015-11-13py: Allow to import compiled bytecode files.Damien George
2015-11-13py: Add MICROPY_PERSISTENT_CODE_LOAD/SAVE to load/save bytecode.Damien George
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.
2015-11-13py: Add MICROPY_PERSISTENT_CODE so code can persist beyond the runtime.Damien George
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.
2015-11-13py: Add constant table to bytecode.Damien George
Contains just argument names at the moment but makes it easy to add arbitrary constants.
2015-11-13py: Put all bytecode state (arg count, etc) in bytecode.Damien George
2015-11-13py: Reorganise bytecode layout so it's more structured, easier to edit.Damien George
2015-11-09py/emitinlinethumb: Allow to compile with -Wsign-compare.Damien George
2015-11-09py/asmthumb: Allow to compile with -Wsign-compare and -Wunused-parameter.Damien George
2015-11-09py/objint_longlong: Instead of assert, throw OverflowError.Paul Sokolovsky
2015-11-07py: Clear finalizer flag when calling gc_free.Dave Hylands
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.