- 12 Aug, 2016 1 commit
-
-
Paul Sokolovsky authored
Checks for number of args removes where guaranteed by function descriptor, self checking is replaced with mp_check_self(). In few cases, exception is raised instead of assert.
-
- 11 Jan, 2016 3 commits
-
-
Damien George authored
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
-
Damien George authored
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
-
Damien George authored
This patch changes the type signature of .make_new and .call object method slots to use size_t for n_args and n_kw (was mp_uint_t. Makes code more efficient when mp_uint_t is larger than a machine word. Doesn't affect ports when size_t and mp_uint_t have the same size.
-
- 03 Jan, 2016 1 commit
-
-
Damien George authored
Only types whose iterator instances still fit in 4 machine words have been changed to use the polymorphic iterator. Reduces Thumb2 arch code size by 264 bytes.
-
- 29 Nov, 2015 2 commits
-
-
Damien George authored
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.
-
Damien George authored
-
- 11 Oct, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 28 Aug, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 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.
-
- 20 Mar, 2015 1 commit
-
-
Damien George authored
Addresses issue #1160.
-
- 20 Jan, 2015 1 commit
-
-
Damien George authored
See issue #699.
-
- 01 Jan, 2015 1 commit
-
-
Damien George authored
Addresses issue #1022.
-
- 30 Aug, 2014 1 commit
-
-
Damien George authored
Part of code cleanup, towards resolving issue #50.
-
- 29 Aug, 2014 1 commit
-
-
Damien George authored
Addressing issue #50, still some way to go yet.
-
- 31 Jul, 2014 1 commit
-
-
Damien George authored
Addresses issue #724.
-
- 03 Jul, 2014 1 commit
-
-
Damien George authored
See discussion in issue #50.
-
- 01 Jun, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
-
- 24 May, 2014 1 commit
-
-
Damien George authored
Now of the form MICROPY_PY_*. See issue #35.
-
- 21 May, 2014 1 commit
-
-
Damien George authored
See issue #608 for justification.
-
- 11 May, 2014 1 commit
-
-
Damien George authored
-
- 10 May, 2014 3 commits
-
-
Paul Sokolovsky authored
Takes 416 text bytes on x86.
-
Paul Sokolovsky authored
Tired of patching CPython stdlib for it.
-
Damien George authored
-
- 03 May, 2014 1 commit
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
- 02 May, 2014 1 commit
-
-
Paul Sokolovsky authored
Specifically, nlr.h does.
-
- 17 Apr, 2014 1 commit
-
-
Damien George authored
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
-
- 13 Apr, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 11 Apr, 2014 1 commit
-
-
Damien George authored
I'm pretty sure these are never reached, since NOT_EQUAL is always converted into EQUAL in mp_binary_op. No one should call type.binary_op directly, they should always go through mp_binary_op (or mp_obj_is_equal).
-
- 07 Apr, 2014 1 commit
-
-
Paul Sokolovsky authored
No longer needed after recent change which guarantees that mp_set_init() will allocate exact number of slots requested.
-
- 05 Apr, 2014 3 commits
-
-
Damien George authored
Towards addressing issue #424. Had a small increase to ROM usage (order 60 bytes).
-
Damien George authored
This does not affect code size or performance when debugging turned off. To address issue #420.
-
Damien George authored
Hash table can now be completely full (ie now NULL entry) before a resize is triggered. Use sentinel value to indicate delete entry in the table.
-
- 30 Mar, 2014 3 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
-
Damien George authored
Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
-
- 29 Mar, 2014 1 commit
-
-
Damien George authored
-
- 26 Mar, 2014 1 commit
-
-
Damien George authored
Originally, .methods was used for methods in a ROM class, and locals_dict for methods in a user-created class. That distinction is unnecessary, and we can use locals_dict for ROM classes now that we have ROMable maps. This removes an entry in the bloated mp_obj_type_t struct, saving a word for each ROM object and each RAM object. ROM objects that have a methods table (now a locals_dict) need an extra word in total (removed the methods pointer (1 word), no longer need the sentinel (2 words), but now need an mp_obj_dict_t wrapper (4 words)). But RAM objects save a word because they never used the methods entry. Overall the ROM usage is down by a few hundred bytes, and RAM usage is down 1 word per user-defined type/class. There is less code (no need to check 2 tables), and now consistent with the way ROM modules have their tables initialised. Efficiency is very close to equivaluent.
-