summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-09-29py: Add store r8 and store r16 ops to asm_x86 and asm_x64.Damien George
2014-09-29py: In asmthumb, clean up unit/int types and ite ops.Damien George
2014-09-28Fix error: unknown type name 'size_t'bvernoux
2014-09-26py: Clean up nlr*.S to make it easier to read; fix clang .bss error.Damien George
It seems that newer versions of clang don't like the .bss directive, so we don't use it for OSX. Addressing issues #865 and #875.
2014-09-25py: Simplify JSON str printing (while still conforming to JSON spec).Damien George
The JSON specs are relatively flexible and allow us to use one function to print strings, be they ascii, bytes or utf-8 encoded.
2014-09-25py: Tidy up exception matching; allow matching of tuple of exceptions.Damien George
Addresses issue #864.
2014-09-25py: For malloc and vstr functions, use size_t exclusively for int type.Damien George
It seems most sensible to use size_t for measuring "number of bytes" in malloc and vstr functions (since that's what size_t is for). We don't use mp_uint_t because malloc and vstr are not Micro Python specific.
2014-09-23py: Free non-interned strings in the parser when not needed.Damien George
mp_parse_node_free now frees the memory associated with non-interned strings. And the parser calls mp_parse_node_free when discarding a non-used node (such as a doc string). Also, the compiler now frees the parse tree explicitly just before it exits (as opposed to relying on the caller to do this). Addresses issue #708 as best we can.
2014-09-23py: Make native emitter handle multi-compare and not/is not/not in ops.Damien George
2014-09-23stmhal: Initialise stack pointer correctly.Damien George
Stack is full descending and must be 8-byte aligned. It must start off pointing to just above the last byte of RAM. Previously, stack started pointed to last byte of RAM (eg 0x2001ffff) and so was not 8-byte aligned. This caused a bug in combination with alloca. This patch also updates some debug printing code. Addresses issue #872 (among many other undiscovered issues).
2014-09-21extmod: Add loads to ujson module.Damien George
2014-09-17py: Add 'builtins' module.Damien George
2014-09-17py: Add native json printing using existing print framework.Damien George
Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
2014-09-17py: Make dict use a bit less RAM when iterating; properly del values.Damien George
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.
2014-09-15py: Make asm_arm_less_op take destination register as first arg.Damien George
This gets ARM native emitter working againg and addresses issue #858.
2014-09-15py: Move definition of mp_sys_exit to core.Damien George
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.
2014-09-13py: Fix build error when float disabled; add test for divmod.Damien George
2014-09-13py: Implement divmod, % and proper // for floating point.Damien George
Tested and working on unix and pyboard.
2014-09-12py: Load strings as objects when compiling viper.Damien George
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.
2014-09-11py and libm: Add asinf,acosf; print higher precision for float.Damien George
Also use less stack space when printing single precision float. Addition of asinf and acosf addresses issue #851.
2014-09-10py: Enable struct/binary-helper to parse q and Q sized ints.Damien George
Addresses issue #848.
2014-09-08py: Put define of x86 argument registers in asmx86.h.Damien George
2014-09-08py: Convert [u]int to mp_[u]int_t in emit.h and associated .c files.Damien George
Towards resolving issue #50.
2014-09-08py: Print imported module's location (__file__) if available.Damien George
2014-09-07Remove skeletal modselect from extmod and just put it in stmhal.Damien George
2014-09-07py: Rename mp_builtin_id to mp_obj_id and make it public.Damien George
2014-09-07stmhal: Implement generic select.select and select.poll.Damien George
2014-09-07py: Add ioctl method to stream protocol; add initial modselect.Damien George
2014-09-07py: Clean up x86-64 native assembler; allow use of extended regs.Damien George
Native x86-64 now has 3 locals in registers.
2014-09-06py: Adjust regs for x86 so that 1 more local can live in a reg.Damien George
2014-09-06py: Allow x86 native functions to take arguments.Damien George
Fix some bugs with x86 stack and saving registers correctly.
2014-09-06py: Add support for emitting native x86 machine code.Damien George
2014-09-06Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-09-06py: Native emitter now supports delete name & global, and end finally.Damien George
2014-09-06modstruct: Implement 'O', 'P', 's' types for packed structs.Paul Sokolovsky
This is required to deal with, well, packed C structs containing pointers.
2014-09-06py: Correctly set sys.maxsize value for 64-bit.Paul Sokolovsky
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.
2014-09-06py: Fix definition of sys.maxsize with mpz changes.Damien George
2014-09-06py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch.Damien George
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.
2014-09-05py: Convert (u)int to mp_(u)int_t in mpz, and remove unused function.Damien George
2014-09-05py: Use % str formatting instead of {} in makeqstrdata.py.Damien George
Script is equivalent, but now also runs under ancient Python 2.6. Goes part way to addressing issue #847.
2014-09-04py: Use variable length encoded uints in more places in bytecode.Damien George
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.
2014-09-03Code style/whitespace cleanup; remove obsolete headers.Damien George
And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
2014-09-03Add cache flush in py/asmarm.c and add new MP_PLAT_ALLOC_EXEC and ↵Fabian Vogt
MP_PLAT_FREE_EXEC macros Fixes issue #840
2014-08-30py: Small simplifications in tuple and list accessors.Damien George
2014-08-30py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.Damien George
Part of code cleanup, working towards resolving issue #50.
2014-08-30py: Remove use of int type in obj.h.Damien George
Part of code cleanup, working towards resolving issue #50.
2014-08-30py: Change all uint to mp_uint_t in obj.h.Damien George
Part of code cleanup, working towards resolving issue #50.
2014-08-30py: Make tuple and list use mp_int_t/mp_uint_t.Damien George
Part of code cleanup, to resolve issue #50.
2014-08-30py: Make map, dict, set use mp_int_t/mp_uint_t exclusively.Damien George
Part of code cleanup, towards resolving issue #50.
2014-08-30py: Save about 200 bytes of ROM by using smaller type for static table.Damien George