summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* py: Add 'builtins' module.Damien George2014-09-17
|
* py: Add native json printing using existing print framework.Damien George2014-09-17
| | | | | Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
* py: Make dict use a bit less RAM when iterating; properly del values.Damien George2014-09-17
| | | | | | | | Heap RAM was being allocated to print dicts and do some other types of iterating. Now these iterations use 1 word of state on the stack. Deleting elements from a dict was not allowing the value to be reclaimed by the GC. This is now fixed.
* py: Make asm_arm_less_op take destination register as first arg.Damien George2014-09-15
| | | | This gets ARM native emitter working againg and addresses issue #858.
* py: Move definition of mp_sys_exit to core.Damien George2014-09-15
| | | | | | | | sys.exit always raises SystemExit so doesn't need a special implementation for each port. If C exit() is really needed, use the standard os._exit function. Also initialise mp_sys_path and mp_sys_argv in teensy port.
* py: Fix build error when float disabled; add test for divmod.Damien George2014-09-13
|
* py: Implement divmod, % and proper // for floating point.Damien George2014-09-13
| | | | Tested and working on unix and pyboard.
* py: Load strings as objects when compiling viper.Damien George2014-09-12
| | | | | | | | | Eventually, viper wants to be able to use raw pointers to strings and arrays for efficient access. But for now, let's just load strings as a Python object so they can be used as normal. This will anyway be compatible with eventual intended viper behaviour. Addresses issue #857.
* py and libm: Add asinf,acosf; print higher precision for float.Damien George2014-09-11
| | | | | | Also use less stack space when printing single precision float. Addition of asinf and acosf addresses issue #851.
* py: Enable struct/binary-helper to parse q and Q sized ints.Damien George2014-09-10
| | | | Addresses issue #848.
* py: Put define of x86 argument registers in asmx86.h.Damien George2014-09-08
|
* py: Convert [u]int to mp_[u]int_t in emit.h and associated .c files.Damien George2014-09-08
| | | | Towards resolving issue #50.
* py: Print imported module's location (__file__) if available.Damien George2014-09-08
|
* Remove skeletal modselect from extmod and just put it in stmhal.Damien George2014-09-07
|
* py: Rename mp_builtin_id to mp_obj_id and make it public.Damien George2014-09-07
|
* stmhal: Implement generic select.select and select.poll.Damien George2014-09-07
|
* py: Add ioctl method to stream protocol; add initial modselect.Damien George2014-09-07
|
* py: Clean up x86-64 native assembler; allow use of extended regs.Damien George2014-09-07
| | | | Native x86-64 now has 3 locals in registers.
* py: Adjust regs for x86 so that 1 more local can live in a reg.Damien George2014-09-06
|
* py: Allow x86 native functions to take arguments.Damien George2014-09-06
| | | | Fix some bugs with x86 stack and saving registers correctly.
* py: Add support for emitting native x86 machine code.Damien George2014-09-06
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-09-06
|\
| * modstruct: Implement 'O', 'P', 's' types for packed structs.Paul Sokolovsky2014-09-06
| | | | | | | | This is required to deal with, well, packed C structs containing pointers.
| * py: Correctly set sys.maxsize value for 64-bit.Paul Sokolovsky2014-09-06
| | | | | | | | | | | | Type representing signed size doesn't have to be int, so use special value which defaults to SSIZE_MAX, but as it's not defined by C standard (but rather by POSIX), allow ports to set it.
* | py: Native emitter now supports delete name & global, and end finally.Damien George2014-09-06
|/
* py: Fix definition of sys.maxsize with mpz changes.Damien George2014-09-06
|
* py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch.Damien George2014-09-06
| | | | | | | | | | | | | | | | Previously, mpz was restricted to using at most 15 bits in each digit, where a digit was a uint16_t. With this patch, mpz can use all 16 bits in the uint16_t (improvement to mpn_div was required). This gives small inprovements in speed and RAM usage. It also yields savings in ROM code size because all of the digit masking operations become no-ops. Also, mpz can now use a uint32_t as the digit type, and hence use 32 bits per digit. This will give decent improvements in mpz speed on 64-bit machines. Test for big integer division added.
* py: Convert (u)int to mp_(u)int_t in mpz, and remove unused function.Damien George2014-09-05
|
* py: Use % str formatting instead of {} in makeqstrdata.py.Damien George2014-09-05
| | | | | Script is equivalent, but now also runs under ancient Python 2.6. Goes part way to addressing issue #847.
* py: Use variable length encoded uints in more places in bytecode.Damien George2014-09-04
| | | | | | Code-info size, block name, source name, n_state and n_exc_stack now use variable length encoded uints. This saves 7-9 bytes per bytecode function for most functions.
* Code style/whitespace cleanup; remove obsolete headers.Damien George2014-09-03
| | | | And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
* Add cache flush in py/asmarm.c and add new MP_PLAT_ALLOC_EXEC and ↵Fabian Vogt2014-09-03
| | | | | | MP_PLAT_FREE_EXEC macros Fixes issue #840
* py: Small simplifications in tuple and list accessors.Damien George2014-08-30
|
* py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.Damien George2014-08-30
| | | | Part of code cleanup, working towards resolving issue #50.
* py: Remove use of int type in obj.h.Damien George2014-08-30
| | | | Part of code cleanup, working towards resolving issue #50.
* py: Change all uint to mp_uint_t in obj.h.Damien George2014-08-30
| | | | Part of code cleanup, working towards resolving issue #50.
* py: Make tuple and list use mp_int_t/mp_uint_t.Damien George2014-08-30
| | | | Part of code cleanup, to resolve issue #50.
* py: Make map, dict, set use mp_int_t/mp_uint_t exclusively.Damien George2014-08-30
| | | | Part of code cleanup, towards resolving issue #50.
* py: Save about 200 bytes of ROM by using smaller type for static table.Damien George2014-08-30
|
* Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George2014-08-30
| | | | Addressing issue #50, still some way to go yet.
* py: Use memmove instead of memcpy when appropriate.Damien George2014-08-29
| | | | | Found this bug by running unix/ tests with DEBUG=1 enabled when compiling.
* py: Fix 2 bugs in native emitter: jump_or_pop and stack settling.Damien George2014-08-29
| | | | Addresses issue #838.
* py: Add compiler optimisation for conditions in parenthesis.Damien George2014-08-29
| | | | | | | Optimises: if () -> if False if (x,...) -> if True if (a and b) -> if a and b
* py: Move native glue code from runtime.c to new file nativeglue.c.v1.3.1Damien George2014-08-28
| | | | | | | | This way, the native glue code is only compiled if native code is enabled (which makes complete sense; thanks to Paul Sokolovsky for the idea). Should fix issue #834.
* Merge pull request #833 from Vogtinator/arm-nativeDamien George2014-08-28
|\ | | | | Basic native ARM emitter
| * Clarify copyright on asmarm filesFabian Vogt2014-08-28
| |
| * Basic native ARM emitterFabian Vogt2014-08-27
| |
* | py, gc: Further reduce heap fragmentation with new, faster gc alloc.Damien George2014-08-28
| | | | | | | | | | | | | | | | | | | | | | The heap allocation is now exactly as it was before the "faster gc alloc" patch, but it's still nearly as fast. It is fixed by being careful to always update the "last free block" pointer whenever the heap changes (eg free or realloc). Tested on all tests by enabling EXTENSIVE_HEAP_PROFILING in py/gc.c: old and new allocator have exactly the same behaviour, just the new one is much faster.
* | py: Reduce fragmentation of GC heap.Damien George2014-08-28
|/ | | | | | | | | | | Recent speed up of GC allocation made the GC have a fragmented heap. This patch restores "original fragmentation behaviour" whilst still retaining relatively fast allocation. This patch works because there is always going to be a single block allocated now and then, which advances the gc_last_free_atb_index pointer often enough so that the whole heap doesn't need scanning. Should address issue #836.
* py: Improve efficiency of MP_OBJ_IS_STR_OR_BYTES.Damien George2014-08-27
| | | | | Saves ROM (16 on stmhal, 240 on 64-bit unix) and should be quicker since there is 1 less branch.