- Sep 20, 2018
-
-
Peter Hinch authored
-
Damien George authored
This is required for DEBUG=1 builds when MICROPY_FLOAT_IMPL=double. Thanks to Andrew Leech.
-
Andrew Leech authored
This provides a double variant of the float copysignf from libm/math.c which is required for DEBUG=1 builds when MICROPY_FLOAT_IMPL=double
-
Peter Hinch authored
pyb.mount(None, mountpoint) functionality is also removed and replaced by uos.umount.
-
Peter Hinch authored
pyb.umount(None, mountpoint) no longer works.
-
Damien George authored
Changes made: - make use of MP_OBJ_TO_PTR and MP_OBJ_FROM_PTR where necessary - fix shadowing of index variable i, renamed to j - fix type of above variable to size_t to prevent comparison warning - fix shadowing of res variable - use "(void)" instead of "()" for functions that take no arguments
-
Paul Sokolovsky authored
And thus be buildable again.
-
Damien George authored
This commit implements PEP479 which disallows raising StopIteration inside a generator to signal that it should be finished. Instead, the generator should simply return when it is complete. See https://www.python.org/dev/peps/pep-0479/ for details.
-
Andrew Leech authored
This part is functionally similar to STM32F767xx (they share a datasheet) so support is generally comparable. When adding board support the stm32f767_af.csv and stm32f767.ld should be used.
-
Paul Sokolovsky authored
Instead of redirecting to str.__mod__(), use str.format() in this case.
-
Paul Sokolovsky authored
Default is enabled, disabled for minimal builds. Saves 1296 bytes on x86, 976 bytes on ARM.
-
Damien George authored
-
Damien George authored
In 0e80f345 the inplace operations __iadd__ and __isub__ were made unconditionally available, so the comment about this section is changed to reflect that.
-
Damien George authored
-
Damien George authored
-
- Sep 18, 2018
-
-
Damien George authored
The intention of oflush() is to flush the "fast SPI" command itself so that the SPI object is ready to use when the function returns.
-
- Sep 16, 2018
-
-
Damien George authored
Changes made: - fix DMA_SUB_INSTANCE_AS_UINT8 - fix dma_id numbers in dma_descr_t - add F0 DMA IRQ handlers - set DmaBaseAddress and ChannelIndex when reinit'ing
-
- Sep 15, 2018
-
-
Damien George authored
Fixes issue #4113.
-
Damien George authored
Loading a pointer by indexing into the native function table mp_fun_table, rather than loading an immediate value (via a PC-relative load), uses less code space.
-
Damien George authored
Viper functions will now capture the globals at the point they were defined and use these globals when executing.
-
Damien George authored
Old globals are now stored in the second slot (ip in mp_code_state_t) to make things simpler for viper.
-
Damien George authored
-
Damien George authored
This commit makes viper functions have the same signature as native functions, at the level of the emitter/assembler. This means that viper functions can now be wrapped in the same uPy object as native functions. Viper functions are now responsible for parsing their arguments (before it was done by the runtime), and this makes calling them more efficient (in most cases) because the viper entry code can be custom generated to suit the signature of the function. This change also opens the way forward for viper functions to take arbitrary numbers of arguments, and for them to handle globals correctly, among other things.
-
Damien George authored
-
Damien George authored
-
Damien George authored
Now that the compiler can store the results of the viper types in the scope, the viper parameter annotation compilation stage can be merged with the normal parameter compilation stage.
-
Damien George authored
In viper mode, the type of the argument is now stored in id_info->flags.
-
Damien George authored
Instead this return type is now stored in the scope_flags.
-
Damien George authored
The native emitter can easily determine the mode via scope->emit_options.
-
Damien George authored
-
- Sep 14, 2018
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
With 5 arguments to mp_arg_check_num(), some architectures need to pass values on the stack. So compressing n_args_min, n_args_max, takes_kw into a single word and passing only 3 arguments makes the call more efficient, because almost all calls to this function pass in constant values. Code size is also reduced by a decent amount: bare-arm: -116 minimal x86: -64 unix x64: -256 unix nanbox: -112 stm32: -324 cc3200: -192 esp8266: -192 esp32: -144
-
Damien George authored
-
Dave Hylands authored
This issue was brought up by BramPeters in the forum: https://forum.micropython.org/viewtopic.php?p=30066
-
Siarhei Farbotka authored
-
Paul Sokolovsky authored
If DTTOIF() macro is not defined, the code refers to MP_S_IFDIR, etc. symbols defined in extmod/vfs.h, so should include it. This fixes build for Android.
-
Paul Sokolovsky authored
Added cmake_minimum_required and updated target_link_libraries directives.
-
Paul Sokolovsky authored
net_config subsystem was split off from net_app, and as a result, settings need renaming from CONFIG_NET_APP_* to CONFIG_NET_CONFIG_*.
-
- Sep 13, 2018
-
-
Damien George authored
Prior to this commit a function compiled with the native decorator @micropython.native would not work correctly when accessing global variables, because the globals dict was not being set upon function entry. This commit fixes this problem by, upon function entry, setting as the current globals dict the globals dict context the function was defined within, as per normal Python semantics, and as bytecode does. Upon function exit the original globals dict is restored. In order to restore the globals dict when an exception is raised the native function must guard its internals with an nlr_push/nlr_pop pair. Because this push/pop is relatively expensive, in both C stack usage for the nlr_buf_t and CPU execution time, the implementation here optimises things as much as possible. First, the compiler keeps track of whether a function even needs to access global variables. Using this information the native emitter then generates three different kinds of code: 1. no globals used, no exception handlers: no nlr handling code and no setting of the globals dict. 2. globals used, no exception handlers: an nlr_buf_t is allocated on the C stack but it is not used if the globals dict is unchanged, saving execution time because nlr_push/nlr_pop don't need to run. 3. function has exception handlers, may use globals: an nlr_buf_t is allocated and nlr_push/nlr_pop are always called. In the end, native functions that don't access globals and don't have exception handlers will run more efficiently than those that do. Fixes issue #1573.
-