| Commit message (Collapse) | Author | Age |
|
|
|
| |
Addresses issue #838.
|
|
|
|
|
|
|
| |
Optimises:
if () -> if False
if (x,...) -> if True
if (a and b) -> if a and b
|
| |
|
|
|
|
|
|
|
|
| |
This way, the native glue code is only compiled if native code is
enabled (which makes complete sense; thanks to Paul Sokolovsky for
the idea).
Should fix issue #834.
|
|\
| |
| | |
Basic native ARM emitter
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The heap allocation is now exactly as it was before the "faster gc
alloc" patch, but it's still nearly as fast. It is fixed by being
careful to always update the "last free block" pointer whenever the heap
changes (eg free or realloc).
Tested on all tests by enabling EXTENSIVE_HEAP_PROFILING in py/gc.c:
old and new allocator have exactly the same behaviour, just the new one
is much faster.
|
|/
|
|
|
|
|
|
|
|
|
| |
Recent speed up of GC allocation made the GC have a fragmented heap.
This patch restores "original fragmentation behaviour" whilst still
retaining relatively fast allocation. This patch works because there is
always going to be a single block allocated now and then, which advances
the gc_last_free_atb_index pointer often enough so that the whole heap
doesn't need scanning.
Should address issue #836.
|
|\ |
|
| |
| |
| |
| |
| | |
Saves ROM (16 on stmhal, 240 on 64-bit unix) and should be quicker since
there is 1 less branch.
|
|/|
| |
| |
| | |
dhylands-int-bytes
|
| | |
|
| |
| |
| |
| |
| |
| | |
-t/--target is a pip option. Trying to use pip options for different meanings
in pip-micropython may lead to big confusion. That's why the original passed
any extra parameters using environment variables. "All options belong to pip."
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With a file with 1 line (and an error on that line), used to show the
line as number 0. Now shows it correctly as line number 1.
But, when line numbers are disabled, it now prints line number 1 for any
line that has an error (instead of 0 as previously). This might end up
being confusing, but requires extra RAM and/or hack logic to make it
print something special in the case of no line numbers.
|
|\ \
| | |
| | | |
Fix sdcard_power_on to not do anything if the card is already powered on...
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
Also add -t/--target option to pip-micropython to allowing installing to
the pyboard.
Thanks to turbinenreiter/Sebastian Plamauer for the patch.
|
| |
| |
| |
| | |
Thanks to Dave Hylands for this patch.
|
| |
| |
| |
| | |
Addresses issue #825.
|
| |
| |
| |
| | |
Addresses issue #827.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
SysTick IRQ now increases millisecond counter directly (ie without
calling HAL_IncTick). Provide our own version of HAL_Delay that does a
wfi while waiting. This more than halves power consumption when running
a loop containing a pyb.delay call. It used to be like this, but new
version of HAL library regressed this feature.
|
| | |
|
| |
| |
| |
| | |
Also some whitespace cleanup.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I also removed trailing spaces from modpyb.c which affected a couple
of lines technically not part of this patch.
Tested using: https://github.com/dhylands/upy-examples/blob/master/micros_test.py
which eventually fails due to wraparound issues (I could fix the test to compensate
but didn't bother)
|
|/
|
|
| |
Factored irq functions into a separate file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are generally 1 machine instruction, and are used in
critical code, so makes sense to have them inline.
Also leave these functions uninverted (ie 0 means enable, 1 means
disable) and provide macro constants if you really need to distinguish
the states. This makes for smaller code as well (combined with
inlining).
Applied to teensy port as well.
|
|
|
|
| |
Factored irq functions into a separate file.
|
|
|
|
| |
Addresses issue #811.
|
|
|
|
| |
Script is due to Dave Hylands.
|
| |
|
|
|
|
| |
Added some functions to Pin class to query mode, pull, and af
|
|\ |
|
| |
| |
| |
| | |
Also added test for modtime.
|
|/
|
|
| |
Now you can use time.localtime on the timestamps presented by os.stat
|
|
|
|
|
|
|
|
| |
Because (for Thumb) a function pointer has the LSB set, pointers to
dynamic functions in RAM (eg native, viper or asm functions) were not
being traced by the GC. This patch is a comprehensive fix for this.
Addresses issue #820.
|
| |
|
|
|
|
|
|
|
|
| |
Also provides setraw() function from "tty" module (which in CPython is
implemented in Python). The idea here is that 95% of "termios" module usage
is to set raw mode to allow access to normal serial devices. Then, instead
of exporting gazillion termios symbols, it's better to implement it in C,
and export minimal number of symbols (mostly baud rates and drain values).
|
|
|
|
|
| |
ROM down by 320 bytes on stmhal. RAM down by 5.5k for a decompression
object.
|
|
|
|
|
| |
This allows to make strings longer than 64k. It doesn't use any more
RAM with current GC because a str object still fits in a GC block.
|
| |
|
|
|
|
|
|
|
|
|
| |
This simple patch gives a very significant speed up for memory allocation
with the GC.
Eg, on PYBv1.0:
tests/basics/dict_del.py: 3.55 seconds -> 1.19 seconds
tests/misc/rge_sm.py: 15.3 seconds -> 2.48 seconds
|
|\
| |
| | |
unix: Added install/uninstall
|
| | |
|
| | |
|