- Mar 21, 2017
-
-
Damien George authored
-
Damien George authored
Thanks to @robert-hh.
-
- Mar 20, 2017
-
-
Damien George authored
We can actually handle interrupts during a thread switch (because we always have a valid stack), but only if those interrupts don't access any of the thread state (because the state may not correspond to the stack pointer). So to be on the safe side we disable interrupts during the very short period of the thread state+stack switch.
-
Damien George authored
The scheduler being locked general means we are running a scheduled function, and switching to another thread violates that, so don't switch in such a case (even though we technically could). And if we are running a scheduled function then we want to finish it ASAP, so we shouldn't switch to another thread. Furthermore, ports with threading enabled will lock the scheduler during a hard IRQ, and this patch to the VM will make sure that threads are not switched during a hard IRQ (which would crash the VM).
-
Peter Hinch authored
MHLSB and MHMSB formats are added to the framebuf module, which have 8 adjacent horizontal pixels represented in a single byte.
-
transistortim authored
Since eaef6b53 writes are used instead of reads.
-
Damien George authored
-
Damien George authored
-
Damien George authored
All arguments to pin.irq are converted from keyword-only to positional, and can still be specified by keyword so it's a backwards compatible change. The default value for the "trigger" arg is changed from 0 (no trigger) to rising+falling edge.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
ExtInt, Timer and CAN IRQ callbacks are made to work with the scheduler. They are still hard IRQs by default, but one can now call micropython.schedule within the hard IRQ to schedule a soft callback.
-
Damien George authored
-
Damien George authored
-
stijn authored
Instead of always reporting some object cannot be implicitly be converted to a 'str', even when it is a 'bytes' object, adjust the logic so that when trying to convert str to bytes it is shown like that. This will still report bad implicit conversion from e.g. 'int to bytes' as 'int to str' but it will not result in the confusing 'can't convert 'str' object to str implicitly' anymore for calls like b'somestring'.count('a').
-
- Mar 17, 2017
-
-
Christopher Arndt authored
* Fix mis-spelling of `ticks_add` in code examples. * Be consistent about parentheses after function names. * Be consistent about formatting of function, variable and constant names. * Be consistent about spaces and punctuation. * Fix some language errors (missing or wrong words, wrong word order). * Keep line length under 90 chars. Signed-off-by:
Christopher Arndt <chris@chrisarndt.de>
-
Damien George authored
This has a noticeable improvement on x86-64 and Thumb2 archs, where stack usage is reduced by 2 machine words in the VM.
-
Damien George authored
Instead of caching data that is constant (code_info, const_table and n_state), store just a pointer to the underlying function object from which this data can be derived. This helps reduce stack usage for the case when the mp_code_state_t structure is stored on the stack, as well as heap usage when it's stored on the heap. The downside is that the VM becomes a little more complex because it now needs to derive the data from the underlying function object. But this doesn't impact the performance by much (if at all) because most of the decoding of data is done outside the main opcode loop. Measurements using pystone show that little to no performance is lost. This patch also fixes a nasty bug whereby the bytecode can be reclaimed by the GC during execution. With this patch there is always a pointer to the function object held by the VM during execution, since it's stored in the mp_code_state_t structure.
-
- Mar 16, 2017
-
-
Damien George authored
-
Damien George authored
The RHS can only be returned if it is the same type as the LHS.
-
- Mar 15, 2017
-
-
Damien George authored
This allows to test the PYBV11 target as well as the network drivers without adding another rule. It also removes the need to use -B, side-stepping the issue of whether or not -B works with qstr auto generation.
-
Damien George authored
-
Damien George authored
When make is passed "-B" it seems that everything is considered out-of-date and so $? expands to all prerequisites. Thus there is no need for a special check to see if $? is emtpy.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- Mar 14, 2017
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Assertions are used to check expressions that should always be true, and mp_not_implemented is used for code that can be reached.
-
Rami Ali authored
-
Damien George authored
This is so the test can run successfully on targets that already have something mounted.
-
Damien George authored
-
Damien George authored
-
Damien George authored
The 'S' typecode is a uPy extension so it should be grouped with the other extension (namely 'O' typecode). Testing 'S' needs uctypes which is an extmod module and not always available, so this test is made optional and will only be run on ports that have (u)struct and uctypes. Otherwise it will be silently skipped.
-
Rami Ali authored
-
Rami Ali authored
-
Damien George authored
-
Damien George authored
Some stack is allocated to format ints, and when the int implementation uses long-long there should be additional stack allocated compared with the other cases. This patch uses the existing "fmt_int_t" type to determine the amount of stack to allocate.
-