- 12 May, 2015 1 commit
-
-
Damien George authored
mp_obj_get_int_truncated will raise a TypeError if the argument is not an integral type. Use mp_obj_int_get_truncated only when you know the argument is a small or big int.
-
- 04 May, 2015 1 commit
-
-
Paul Sokolovsky authored
Refactored from "stm" module, provides mem8, mem16, mem32 objects with array subscript syntax.
-
- 16 Apr, 2015 1 commit
-
-
Damien George authored
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
-
- 11 Apr, 2015 1 commit
-
-
Damien George authored
This simplifies the API for objects and reduces code size (by around 400 bytes on Thumb2, and around 2k on x86). Performance impact was measured with Pystone score, but change was barely noticeable.
-
- 19 Mar, 2015 1 commit
-
-
Damien George authored
-
- 18 Mar, 2015 2 commits
-
-
Paul Sokolovsky authored
Fixes for compiler warnings in pedantic mode.
-
Paul Sokolovsky authored
Includes static function fix and all the previous improvements and fixes by @dpgeorge.
-
- 17 Mar, 2015 1 commit
-
-
stijn authored
-
- 14 Mar, 2015 1 commit
-
-
Damien George authored
-
- 10 Mar, 2015 1 commit
-
-
Damien George authored
-
- 04 Mar, 2015 1 commit
-
-
Damien George authored
See issue #1122.
-
- 21 Feb, 2015 1 commit
-
-
Damien George authored
-
- 18 Feb, 2015 1 commit
-
-
Damien George authored
-
- 08 Feb, 2015 1 commit
-
-
Damien George authored
Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
-
- 02 Feb, 2015 1 commit
-
-
Damien George authored
Addresses issue #1097.
-
- 28 Jan, 2015 3 commits
-
-
Damien George authored
This cleans up vstr so that it's a pure "variable buffer", and the user can decide whether they need to add a terminating null byte. In most places where vstr is used, the vstr did not need to be null terminated and so this patch saves code size, a tiny bit of RAM, and makes vstr usage more efficient. When null termination is needed it must be done explicitly using vstr_null_terminate.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 26 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
Actually manage size of the output buffer.
-
- 23 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 21 Jan, 2015 1 commit
-
-
Damien George authored
With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
-
- 20 Jan, 2015 1 commit
-
-
Damien George authored
See issue #699.
-
- 12 Jan, 2015 1 commit
-
-
Damien George authored
-
- 01 Jan, 2015 1 commit
-
-
Damien George authored
-
- 10 Dec, 2014 1 commit
-
-
Damien George authored
-
- 05 Dec, 2014 1 commit
-
-
Damien George authored
mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
-
- 29 Nov, 2014 2 commits
-
-
Damien George authored
This is just a clean-up of the code. Generated code is exactly the same.
-
Paul Sokolovsky authored
-
- 22 Nov, 2014 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
https://github.com/B-Con/crypto-algorithms revision 100f4ff
-
Paul Sokolovsky authored
-
- 21 Nov, 2014 1 commit
-
-
stijn authored
- update mpconfigport.h to reflect latest unix version - fix compilation error in modure due to msvc not allowing dynamic arrays
-
- 30 Oct, 2014 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Because bytearrays are much friendlier to work with, e.g. they can be printed easily.
-
Paul Sokolovsky authored
Before, sizeof() could be applied to a structure field only if that field was itself a structure. Now it can be applied to PTR and ARRAY fields too. It's not possible to apply it to scalar fields though, because as soon as scalar field (int or float) is dereferenced, its value is converted into Python int/float value, and all original type info is lost. Moreover, we allow sizeof of type definitions too, and there int is used to represent (scalar) types. So, we have ambiguity what int may be - either dereferenced scalar structure field, or encoded scalar type. So, rather throw an error if user tries to apply sizeof() to int.
-
- 22 Oct, 2014 1 commit
-
-
Damien George authored
-
- 17 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 15 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 13 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 12 Oct, 2014 1 commit
-
-
Damien George authored
-