- 30 Apr, 2017 3 commits
-
-
stijn authored
Make qstr generation depend on modifications in mpconfigport.h, mpconfig.h and makeqstrdata.py and if any of those change scan all source files for qstrs again since they might have changed (for example typcially when enabling new features in mpconfig.h). This fixes #2982 for msvc builds.
-
stijn authored
It is not used anywhere and causes a warning about redefinition because it is used in modutimeq.c
-
stijn authored
The standard preprocessor definition to differentiate debug and non-debug builds is NDEBUG, not DEBUG, so don't rely on the latter: - just delete the use of it in objint_longlong.c as it has been stale code for years anyway (since commit [c4029e50]): SUFFIX isn't used anywhere. - replace DEBUG with MICROPY_DEBUG_NLR in nlr.h: it is rarely used anymore so can be off by default
-
- 29 Apr, 2017 5 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
But warn if anything else but host/port is passed.
-
Paul Sokolovsky authored
Similar to the implementation added to unix port module previously.
-
Paul Sokolovsky authored
This follows previous refactor made to unix/moduselect.
-
Paul Sokolovsky authored
-
- 28 Apr, 2017 1 commit
-
-
Damien George authored
extmod/crypto-algorithms/sha256.c was recently fixed so that it didn't include this header.
-
- 27 Apr, 2017 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 26 Apr, 2017 4 commits
-
-
Paul Sokolovsky authored
Otherwise, if we already have a packet in progress, finish it first, before check "peer closed" status.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
It doesn't do anything. The VFS feature is controlled by MICROPY_VFS and the FatFS driver, by MICROPY_VFS_FAT (which are set in mpconfigport.h).
-
- 25 Apr, 2017 6 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Kushal Das authored
As there's no networking support in mainline yet, networking is disabled, because otherwise the board hangs on startup.
-
Damien George authored
-
Damien George authored
The trailing zeros should be truncated from the converted value.
-
Damien George authored
-
- 22 Apr, 2017 10 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
This patch allows the following code to run without allocating on the heap: super().foo(...) Before this patch such a call would allocate a super object on the heap and then load the foo method and call it right away. The super object is only needed to perform the lookup of the method and not needed after that. This patch makes an optimisation to allocate the super object on the C stack and discard it right after use. Changes in code size due to this patch are: bare-arm: +128 minimal: +232 unix x64: +416 unix nanbox: +364 stmhal: +184 esp8266: +340 cc3200: +128
-
Damien George authored
This patch refactors the handling of the special super() call within the compiler. It removes the need for a global (to the compiler) state variable which keeps track of whether the subject of an expression is super. The handling of super() is now done entirely within one function, which makes the compiler a bit cleaner and allows to easily add more optimisations to super calls. Changes to the code size are: bare-arm: +12 minimal: +0 unix x64: +48 unix nanbox: -16 stmhal: +4 cc3200: +0 esp8266: -56
-
Damien George authored
If we get to this point in the code then pn_iter is guaranteed to be a struct.
-
Damien George authored
Prior to making this a config option it was previously available on these (and all other) ports, and it makes sense to keep it enabled for mpy-cross as well as ports that have a decent amount of space for the code.
-
Damien George authored
With this optimisation enabled the compiler optimises the if-else expression within a return statement. The optimisation reduces bytecode size by 2 bytes for each use of such a return-if-else statement. Since such a statement is not often used, and costs bytes for the code, the feature is disabled by default. For example the following code: def f(x): return 1 if x else 2 compiles to this bytecode with the optimisation disabled (left column is bytecode offset in bytes): 00 LOAD_FAST 0 01 POP_JUMP_IF_FALSE 8 04 LOAD_CONST_SMALL_INT 1 05 JUMP 9 08 LOAD_CONST_SMALL_INT 2 09 RETURN_VALUE and to this bytecode with the optimisation enabled: 00 LOAD_FAST 0 01 POP_JUMP_IF_FALSE 6 04 LOAD_CONST_SMALL_INT 1 05 RETURN_VALUE 06 LOAD_CONST_SMALL_INT 2 07 RETURN_VALUE So the JUMP to RETURN_VALUE is optimised and replaced by RETURN_VALUE, saving 2 bytes and making the code a bit faster.
-
Damien George authored
Otherwise the type of parse-node and its kind has to be re-extracted multiple times. This optimisation reduces code size by a bit (16 bytes on bare-arm).
-
Damien George authored
PN_atom_expr_normal parse nodes always have structs for their second sub-node, so simplify the check for the sub-node kind to save code size.
-
Damien George authored
Saves code size (20 bytes on bare-arm) and makes it a tiny bit more efficient.
-
- 21 Apr, 2017 3 commits
-
-
Paul Sokolovsky authored
-
stijn authored
Add definitions/source files for features which work on the windows ports but weren't yet enabled. UTIME related lines are moved a couple of lines up to make comparision with unix/mpconfigport.h easier in the future.
-
Damien George authored
With 30-bit floats there aren't enough bits to faithfully print 7 decimal digits, so reduce the precision to 6 digits.
-
- 19 Apr, 2017 1 commit
-
-
Paul Sokolovsky authored
-
- 18 Apr, 2017 4 commits
-
-
Henrik Sölver authored
Sometimes when setting a channel callback the callback fires immediately, even if the compare register is set to a value far into the future. This happens when the free running counter has previously been equal to what happens to be in the compare register. This patch make sure that there is no pending interrupt when setting a callback.
-
Damien George authored
-
Damien George authored
It controls the character that's used to (asynchronously) raise a KeyboardInterrupt exception. Passing "-1" allows to disable the interception of the interrupt character (as long as a port allows such a behaviour).
-
Damien George authored
-