- 20 Apr, 2015 1 commit
-
-
Damien George authored
This fixes a long standing problem that viper code generation gave terrible error messages, and actually no errors on pyboard where assertions are disabled. Now all compile-time errors are raised as proper Python exceptions, and are of type ViperTypeError. Addresses issue #940.
-
- 19 Apr, 2015 1 commit
-
-
Damien George authored
Addresses issue #1188.
-
- 16 Apr, 2015 3 commits
-
-
Damien George authored
-
Damien George authored
So now all printing should go via either mp_plat_print or mp_sys_stdout_print.
-
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.
-
- 09 Apr, 2015 1 commit
-
-
stijn authored
Fixes msvc linker warnings about mismatching sizes between the mp_obj_fdfile_t struct defined in file.c and the mp_uint_t declarations found in modsys.c and modbuiltins.c
-
- 06 Apr, 2015 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 30 Mar, 2015 1 commit
-
-
Paul Sokolovsky authored
Per https://docs.python.org/3/library/functions.html#round, 2-args format guaranteedly returns float.
-
- 19 Mar, 2015 1 commit
-
-
Damien George authored
-
- 14 Mar, 2015 1 commit
-
-
Damien George authored
-
- 02 Mar, 2015 1 commit
-
-
Damien George authored
-
- 23 Feb, 2015 1 commit
-
-
Paul Sokolovsky authored
Still too shy to implement UnicodeEncodeError which was really needed for micropython-lib case.
-
- 14 Feb, 2015 1 commit
-
-
stijn authored
-
- 28 Jan, 2015 2 commits
-
-
Damien George authored
Addresses issue #1014.
-
Damien George authored
-
- 21 Jan, 2015 1 commit
-
-
Damien George authored
This patch allows to reuse vstr memory when creating str/bytes object. This improves memory usage. Also saves code ROM: 128 bytes on stmhal, 92 bytes on bare-arm, and 88 bytes on unix x64.
-
- 12 Jan, 2015 1 commit
-
-
Damien George authored
-
- 04 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 03 Jan, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 01 Jan, 2015 1 commit
-
-
Damien George authored
Addresses issue #1022.
-
- 27 Dec, 2014 1 commit
-
-
Damien George authored
This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully disable the builtin set object (when set to 0). This includes removing set constructor/comprehension from the grammar, the compiler and the emitters. Now, enabling set costs 8168 bytes on unix x64, and 3576 bytes on stmhal.
-
- 19 Dec, 2014 1 commit
-
-
Damien George authored
Adds just 60 bytes to stmhal binary. Addresses issue #362.
-
- 09 Dec, 2014 1 commit
-
-
Damien George authored
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
-
- 27 Nov, 2014 1 commit
-
-
Paul Sokolovsky authored
Before, __repl_print__() used libc printf(), while print() used uPy streams and own printf() implementation. This led to subtle, but confusing differences in output when just doing "foo" vs "print(foo)" on interactive prompt.
-
- 06 Nov, 2014 1 commit
-
-
Damien George authored
Going from MICROPY_ERROR_REPORTING_NORMAL to MICROPY_ERROR_REPORTING_TERSE now saves 2020 bytes ROM for ARM Thumb2, and 2200 bytes ROM for 32-bit x86. This is about a 2.5% code size reduction for bare-arm.
-
- 31 Oct, 2014 1 commit
-
-
Damien George authored
Addresses issue #934.
-
- 22 Oct, 2014 1 commit
-
-
Damien George authored
Addresses issue #927.
-
- 03 Oct, 2014 1 commit
-
-
Damien George authored
Addressing issue #50.
-
- 13 Sep, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
Tested and working on unix and pyboard.
-
- 07 Sep, 2014 1 commit
-
-
Damien George authored
-
- 30 Aug, 2014 2 commits
-
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
Damien George authored
Part of code cleanup, working towards resolving issue #50.
-
- 24 Aug, 2014 1 commit
-
-
Damien George authored
Addresses issue #811.
-
- 12 Aug, 2014 2 commits
-
-
Damien George authored
reversed function now implemented, and works for tuple, list, str, bytes and user objects with __len__ and __getitem__. Renamed mp_builtin_len to mp_obj_len to make it publically available (eg for reversed).
-
Damien George authored
-
- 31 Jul, 2014 1 commit
-
-
Damien George authored
This removes mpz_as_int, since that was a terrible function (it implemented saturating conversion). Use mpz_as_int_checked and mpz_as_uint_checked. These now work correctly (they previously had wrong overflow checking, eg print(chr(10000000000000)) on 32-bit machine would incorrectly convert this large number to a small int).
-
- 28 Jul, 2014 1 commit
-
-
Paul Sokolovsky authored
Many OSes/CPUs have affinity to put "user" data into lower half of address space. Take advantage of that and remap such addresses into full small int range (including negative part). If address is from upper half, long int will be used. Previously, small int was returned for lower quarter of address space, and upper quarter. For 2 middle quarters, long int was used, which is clearly worse schedule than the above.
-
- 19 Jul, 2014 1 commit
-
-
Paul Sokolovsky authored
And not system printf(), like it was before. For this, move pfenv_printf() from stmhal port to py/.
-