- Mar 26, 2017
-
-
Damien George authored
Link references don't seem to work anymore.
-
- Mar 25, 2017
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
-
- Mar 24, 2017
-
-
Damien George authored
MP_STATE_CTX was recently aliased to MP_STATE_THREAD and can now be removed.
-
Damien George authored
To improve maintainability of the code.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Previous to this patch, if the result of the round function overflowed a small int, or was inf or nan, then a garbage value was returned. With this patch the correct big-int is returned if necessary and exceptions are raised for inf or nan.
-
Damien George authored
The C nearbyint function has exactly the semantics that Python's round() requires, whereas C's round() requires extra steps to handle rounding of numbers half way between integers. So using nearbyint reduces code size and potentially eliminates any source of errors in the handling of half-way numbers. Also, bare-metal implementations of nearbyint can be more efficient than round, so further code size is saved (and efficiency improved). nearbyint is provided in the C99 standard so it should be available on all supported platforms.
-
- Mar 23, 2017
-
-
Damien George authored
-
Damien George authored
One should test bigint, inf and nan to make sure all cases are covered.
-
Damien George authored
Otherwise -0.0 is classified as a bigint, which for builds without bigints will lead unexpectedly to an overflow.
-
Damien George authored
Previous to this patch, if the result of the trunc/ceil/floor functions overflowed a small int, or was inf or nan, then a garbage value was returned. With this patch the correct big-int is returned if necessary, and exceptions are raised for inf or nan.
-
Damien George authored
-
Damien George authored
It improves readability of code and reduces the chance to make a mistake. This patch also fixes a bug with nan-boxing builds by rounding up the calculation of the new NSLOTS variable, giving the correct number of slots (being 4) even if mp_obj_t is larger than the native machine size.
-
Damien George authored
-
Damien George authored
These values are used to compute memory addresses and so size_t is the more appropriate type to use.
-
stijn authored
This assures after cleaning all build artefacts (qstr related files, generated version header) have been removed.
-
stijn authored
Instead of having the PlatformToolset property hardcoded to a specific version just set it to the value of DefaultPlatformToolset: this gets defined according to the commandline environment in which the build was started. Instead of just supporting VS2015 the project can now be built by any version from VS2013 to VS2017 and normally future versions as well, without quirks like VS asking whether you want to upgrade the project to the latest version (as was the case when opening the project in VS2017) or not being able to build at all (as was the case when opening the project in VS2013). Also adjust the .gitignore file to ignore any artefacts from VS2017.
-
Damien George authored
-
Damien George authored
-
Krzysztof Blazewicz authored
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
-
- Mar 22, 2017
-
-
Paul Sokolovsky authored
-
Damien George authored
Now, passing a keyword argument that is not expected will correctly report that fact. If normal or detailed error messages are enabled then the name of the unexpected argument will be reported. This patch decreases the code size of bare-arm and stmhal by 12 bytes, and cc3200 by 8 bytes. Other ports (minimal, unix, esp8266) remain the same in code size. For terse error message configuration this is because the new message is shorter than the old one. For normal (and detailed) error message configuration this is because the new error message already exists in py/objnamedtuple.c so there's no extra space in ROM needed for the string.
-
Damien George authored
-
Damien George authored
-
Damien George authored
GIL behaviour should be handled by the port. And ports probably want to define sleep_us so that it doesn't release the GIL, to improve timing accuracy.
-
Damien George authored
When locking/unlocking a mutex we only need to protect against a thread switch, not general interrupts.
-
Damien George authored
This way, Timer and ExtInt callbacks can interrupt the low-priority pendsv handler (for example thread switching).
-
- 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
-