summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2022-06-21extmod/extmod.mk: Separate out extmod file list from py.mk to extmod.mk.David Lechner
This separates extmod source files from `py.mk`. Previously, `py.mk` assumed that every consumer of the py/ directory also wanted to include extmod/. However, this is not the case. For example, building mpy-cross uses py/ but doesn't need extmod/. This commit moves all extmod-specific items from `py.mk` to `extmod.mk` and explicitly includes `extmod.mk` in ports that use it. Signed-off-by: David Lechner <david@pybricks.com>
2022-06-20extmod/modlwip: Clean up inclusion of modlwip in build process.Damien George
The following changes are made: - Guard entire file with MICROPY_PY_LWIP, so it can be included in the build while still being disabled (for consistency with other extmod modules). - Add modlwip.c to list of all extmod source in py/py.mk and extmod/extmod.cmake so all ports can easily use it. - Move generic modlwip GIT_SUBMODULES build configuration code from ports/rp2/CMakeLists.txt to extmod/extmod.cmake, so it can be reused by other ports. - Remove now unnecessary inclusion of modlwip.c in EXTMOD_SRC_C in esp8266 port, and in SRC_QSTR in mimxrt port. Signed-off-by: Damien George <damien@micropython.org>
2022-06-20py/objcell: Make cell get/set funcs static-inline to reduce code size.Damien George
Change in code size is: bare-arm: -36 -0.062% minimal x86: -92 -0.056% unix x64: -72 -0.014% unix nanbox: -276 -0.060% stm32: +0 +0.000% PYBV10 stm32: -40 +0.021% NUCLEO_L073RZ cc3200: -16 -0.009% esp8266: +176 +0.025% GENERIC esp32: -28 -0.002% GENERIC mimxrt: -56 -0.016% TEENSY40 renesas-ra: +0 +0.000% RA6M2_EK nrf: +0 +0.000% pca10040 rp2: -64 -0.013% PICO samd: -32 -0.023% ADAFRUIT_ITSYBITSY_M4_EXPRESS Ports like stm32 that build the VM with -O3 have no change because the savings from the inlining are offset by additional gcc performance optimisations in the VM. Signed-off-by: Damien George <damien@micropython.org>
2022-06-20py/emit: Suppress unreachable bytecode/native code that follows jump.Damien George
This new logic tracks when an unconditional jump/raise occurs in the emitted code stream (bytecode or native machine code) and suppresses all subsequent code, until a label is assigned. This eliminates a lot of cases of dead code, with relatively simple logic. This commit combined with the previous one (that removed the existing dead-code finding logic) has the following code size change: bare-arm: -16 -0.028% minimal x86: -60 -0.036% unix x64: -368 -0.070% unix nanbox: -80 -0.017% stm32: -204 -0.052% PYBV10 cc3200: +0 +0.000% esp8266: -232 -0.033% GENERIC esp32: -224 -0.015% GENERIC[incl -40(data)] mimxrt: -192 -0.054% TEENSY40 renesas-ra: -200 -0.032% RA6M2_EK nrf: +28 +0.015% pca10040 rp2: -256 -0.050% PICO samd: -12 -0.009% ADAFRUIT_ITSYBITSY_M4_EXPRESS Signed-off-by: Damien George <damien@micropython.org>
2022-06-20py/emit: Remove logic to detect last-emit-was-return-value.Damien George
This optimisation to remove dead code is not as good as it could be. Signed-off-by: Damien George <damien@micropython.org>
2022-06-20py/vm: Change comparison for finally handler search from > to >=.Damien George
The search in these cases should include all finally handlers that are after the current ip. If a handler starts at exactly ip then it is considered "after" the ip. This can happen when END_FINALLY is followed immediately by a finally handler (from a different finally). Consider the function: def f(): try: return 0 finally: print(1) The current bytecode emitter generates the following code: 00 SETUP_FINALLY 5 02 LOAD_CONST_SMALL_INT 0 03 RETURN_VALUE 04 LOAD_CONST_NONE **** 05 LOAD_GLOBAL print 07 LOAD_CONST_SMALL_INT 1 08 CALL_FUNCTION n=1 nkw=0 10 POP_TOP 11 END_FINALLY 12 LOAD_CONST_NONE 13 RETURN_VALUE The LOAD_CONST_NONE marked with **** is dead code because it follows a RETURN_VALUE, and nothing jumps to this LOAD_CONST_NONE. If the emitter could remove this this dead code it would produce: 00 SETUP_FINALLY 4 02 LOAD_CONST_SMALL_INT 0 03 RETURN_VALUE 04 LOAD_GLOBAL print 06 LOAD_CONST_SMALL_INT 1 07 CALL_FUNCTION n=1 nkw=0 09 POP_TOP 10 END_FINALLY 11 LOAD_CONST_NONE 12 RETURN_VALUE In this case the finally block (which starts at offset 4) immediately follows the RETURN_VALUE. When RETURN_VALUE executes ip will point to offset 4 in the bytecode (because the dispatch of the opcode does *ip++) and so the finally handler will only be found if a >= comparison is used. It's a similar story for break/continue: while True: try: break finally: print(1) Although technically in this case the > comparison still works because the extra byte from the UNWIND_JUMP (encoding the number of exception handlers to unwind) doesn't have a *ip++ (just a *ip) so ip remains pointing within the UNWIND_JUMP opcode, and not at the start of the following finally handler. Nevertheless, the change is made to use >= for consistency with the RETURN_VALUE change. Signed-off-by: Damien George <damien@micropython.org>
2022-06-17all: Bump version to 1.19.1.v1.19.1Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-16all: Bump version to 1.19.v1.19Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-14py/makemoduledefs.py: Emit useful error for legacy MP_REGISTER_MODULE.Phil Howard
Catch calls to legacy: MP_REGISTER_MODULE(name, module, enable) Emit a friendly error suggesting they be rewritten to: MP_REGISTER_MODULE(name, module). Signed-off-by: Phil Howard <phil@pimoroni.com>
2022-06-10py/dynruntime: Add macros to access more types and mp_const_empty_bytes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-10py/dynruntime: Add macros to create a new dict and store to dicts.Jeremy Herbert
2022-06-09py/parse: Work around xtensa esp-2020r3 compiler bug.Damien George
This commit works around a bug in xtensa-esp32-elf-gcc version esp-2020r3. The bug is in generation of loop constructs. The below code is generated by the xtensa-esp32 compiler. The first extract is the buggy machine code and the second extract is the corrected machine code. The test `basics/logic_constfolding.py` fails with the first code and succeeds with the second. Disassembly of section .text.push_result_rule: 00000000 <push_result_rule>: ... d6: 209770 or a9, a7, a7 d9: 178976 loop a9, f4 <push_result_rule+0xf4> d9: R_XTENSA_SLOT0_OP .text.push_result_rule+0xf4 dc: 030190 rsr.lend a9 df: 130090 wsr.lbeg a9 e2: a8c992 addi a9, a9, -88 e5: 06d992 addmi a9, a9, 0x600 e8: 130190 wsr.lend a9 eb: 002000 isync ee: 030290 rsr.lcount a9 f1: 01c992 addi a9, a9, 1 f4: 1494e7 bne a4, a14, 10c <push_result_rule+0x10c> f4: R_XTENSA_SLOT0_OP .text.push_result_rule+0x10c Disassembly of section .text.push_result_rule: 00000000 <push_result_rule>: ... d6: 209770 or a9, a7, a7 d9: 178976 loop a9, f4 <push_result_rule+0xf4> d9: R_XTENSA_SLOT0_OP .text.push_result_rule+0xf4 dc: 030190 rsr.lend a9 df: 130090 wsr.lbeg a9 e2: 000091 l32r a9, fffc00e4 <push_result_rule+0xfffc00e4> e2: R_XTENSA_SLOT0_OP .literal.push_result_rule+0x18 e5: 0020f0 nop e8: 130190 wsr.lend a9 eb: 002000 isync ee: 030290 rsr.lcount a9 f1: 01c992 addi a9, a9, 1 f4: 1494e7 bne a4, a14, 10c <push_result_rule+0x10c> f4: R_XTENSA_SLOT0_OP .text.push_result_rule+0x10c Work done in collaboration with @jimmo. Signed-off-by: Damien George <damien@micropython.org>
2022-06-08py/makemoduledefs.py: Remove shebang line and adjust style of comment.Damien George
This file is not executable so shouldn't have the shebang line. This line can cause issues when building on Windows msvc when the PyPython variable is set to something other than "python", because it reverts back to using the shebang line. The top comment is also changed to """ style which matches all other preprocessing scripts in the py/ directory. Signed-off-by: Damien George <damien@micropython.org>
2022-06-08py/compile: Give the compiler a hint about num nodes being non-zero.Damien George
Without this, newer versions of gcc (eg 11.2.0) used with -O2 can warn about `q_ptr` being maybe uninitialized, because it doesn't know that there is at least one qstr being written in to this (alloca'd) memory. As part of this, change the type of `n` to `size_t` so the compiler knows it's unsigned and can generate better code. Code size change for this commit: bare-arm: -28 -0.049% minimal x86: -4 -0.002% unix x64: +0 +0.000% unix nanbox: -16 -0.003% stm32: -24 -0.006% PYBV10 cc3200: -32 -0.017% esp8266: +8 +0.001% GENERIC esp32: -52 -0.003% GENERIC nrf: -24 -0.013% pca10040 rp2: -32 -0.006% PICO samd: -28 -0.020% ADAFRUIT_ITSYBITSY_M4_EXPRESS Signed-off-by: Damien George <damien@micropython.org>
2022-06-07py/bc: Remove unused mp_opcode_format function.Damien George
This was made redundant by f2040bfc7ee033e48acef9f289790f3b4e6b74e5, which also did not update this function for the change to qstr-opcode encoding, so it does not work correctly anyway. Signed-off-by: Damien George <damien@micropython.org>
2022-06-07py/persistentcode: Remove remaining native qstr linking support.Damien George
Support for architecture-specific qstr linking was removed in d4d53e9e114d779523e382c4ea38f0398e880aae, where native code was changed to access qstr values via qstr_table. The only remaining use for the special qstr link table in persistentcode.c is to support native module written in C, linked via mpy_ld.py. But native modules can also use the standard module-level qstr_table (and obj_table) which was introduced in the .mpy file reworking in f2040bfc7ee033e48acef9f289790f3b4e6b74e5. This commit removes the remaining native qstr liking support in persistentcode.c's load_raw_code function, and adds two new relocation options for constants.qstr_table and constants.obj_table. mpy_ld.py is updated to use these relocations options instead of the native qstr link table. Signed-off-by: Damien George <damien@micropython.org>
2022-06-03rp2/Makefile: Use cmake for "make submodules" task when needed.Andrew Leech
Because the submodule list can be updated by cmake files. Signed-off-by: Andrew Leech <andrew@alelec.net>
2022-06-02all: Remove third argument to MP_REGISTER_MODULE.Damien George
It's no longer needed because this macro is now processed after preprocessing the source code via cpp (in the qstr extraction stage), which means unused MP_REGISTER_MODULE's are filtered out by the preprocessor. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02py: Change makemoduledefs process so it uses output of qstr extraction.Damien George
This cleans up the parsing of MP_REGISTER_MODULE() and generation of genhdr/moduledefs.h so that it uses the same process as compressed error string messages, using the output of qstr extraction. This makes sure all MP_REGISTER_MODULE()'s that are part of the build are correctly picked up. Previously the extraction would miss some (eg if you had a mod.c file in the board directory for an stm32 board). Build speed is more or less unchanged. Thanks to @stinos for the ports/windows/msvc/genhdr.targets changes. Signed-off-by: Damien George <damien@micropython.org>
2022-06-01extmod/machine_i2c: Add optional support for write-then-read transfers.Damien George
This option is useful for ports where it's more efficient to do a full I2C transfer in one go. Signed-off-by: Damien George <damien@micropython.org>
2022-05-26py/emitinlinethumb: Make float instruction use dynamically selectable.Damien George
This allows mpy-cross to dynamically select whether ARMv7-M float instructions are supported in @micropython.asm_thumb functions. Signed-off-by: Damien George <damien@micropython.org>
2022-05-26py/emitinlinethumb: Make ARMv7-M instruction use dynamically selectable.Damien George
This follows on from a5324a10747dfba921bb363ed904f05ebb6de010 and allows mpy-cross to dynamically select whether ARMv7-M instructions are supported in @micropython.asm_thumb functions. The config option MICROPY_EMIT_INLINE_THUMB_ARMV7M is no longer needed, it is now controlled by MICROPY_EMIT_THUMB_ARMV7M. Signed-off-by: Damien George <damien@micropython.org>
2022-05-25py/builtin: Clean up and simplify import_stat and builtin_open config.Damien George
The following changes are made: - If MICROPY_VFS is enabled then mp_vfs_import_stat and mp_vfs_open are automatically used for mp_import_stat and mp_builtin_open respectively. - If MICROPY_PY_IO is enabled then "open" is automatically included in the set of builtins, and points to mp_builtin_open_obj. This helps to clean up and simplify the most common port configuration. Signed-off-by: Damien George <damien@micropython.org>
2022-05-24py/asmthumb: Provide implementations of clz/ctz for msvc.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/dynruntime.mk: Add basic support for armv6m architecture.Damien George
The examples/natmod features0 and features1 examples now build and run on ARMv6-M platforms. More complicated examples are not yet supported because the compiler emits references to built-in functions like __aeabi_uidiv. Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/persistentcode: Select ARMV6M as maximum when __thumb2__ not defined.Damien George
If __thumb2__ is defined by the compiler then .mpy files marked as ARMV6M and above (up to ARMV7EMDP) are supported. If it's not defined then only ARMV6M .mpy files are supported. This makes sure that on CPUs like Cortex-M0+ (where __thumb2__ is not defined) only .mpy files marked as ARMV6M can be imported. Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/asmthumb: Make ARMv7-M instruction use dynamically selectable.Damien George
This commit adjusts the asm_thumb_xxx functions so they can be dynamically configured to use ARMv7-M instructions or not. This is available when MICROPY_DYNAMIC_COMPILER is enabled, and then controlled by the value of mp_dynamic_compiler.native_arch. If MICROPY_DYNAMIC_COMPILER is disabled the previous behaviour is retained: the functions emit ARMv7-M instructions only if MICROPY_EMIT_THUMB_ARMV7M is enabled. Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/emitnative: Access qstr values using indirection table qstr_table.Damien George
This changes the native emitter to access qstr values using the qstr indirection table qstr_table, but only when generating native code that will be saved to a .mpy file. This makes the resulting native code fully static, ie it does not require any fix-ups or rewriting when it is imported. The performance of native code is more or less unchanged. Benchmark results on PYBv1.0 (using --via-mpy and --emit native) are: N=100 M=100 baseline -> this-commit diff diff% (error%) bm_chaos.py 407.16 -> 411.85 : +4.69 = +1.152% (+/-0.01%) bm_fannkuch.py 100.89 -> 101.20 : +0.31 = +0.307% (+/-0.01%) bm_fft.py 3521.17 -> 3441.72 : -79.45 = -2.256% (+/-0.00%) bm_float.py 6707.29 -> 6644.83 : -62.46 = -0.931% (+/-0.00%) bm_hexiom.py 55.91 -> 55.41 : -0.50 = -0.894% (+/-0.00%) bm_nqueens.py 5343.54 -> 5326.17 : -17.37 = -0.325% (+/-0.00%) bm_pidigits.py 603.89 -> 632.79 : +28.90 = +4.786% (+/-0.33%) core_qstr.py 64.18 -> 64.09 : -0.09 = -0.140% (+/-0.01%) core_yield_from.py 313.61 -> 311.11 : -2.50 = -0.797% (+/-0.03%) misc_aes.py 654.29 -> 659.75 : +5.46 = +0.834% (+/-0.02%) misc_mandel.py 4205.10 -> 4272.08 : +66.98 = +1.593% (+/-0.01%) misc_pystone.py 3077.79 -> 3128.39 : +50.60 = +1.644% (+/-0.01%) misc_raytrace.py 388.45 -> 393.71 : +5.26 = +1.354% (+/-0.01%) viper_call0.py 576.83 -> 566.76 : -10.07 = -1.746% (+/-0.05%) viper_call1a.py 550.39 -> 540.12 : -10.27 = -1.866% (+/-0.11%) viper_call1b.py 438.32 -> 432.09 : -6.23 = -1.421% (+/-0.11%) viper_call1c.py 442.96 -> 436.11 : -6.85 = -1.546% (+/-0.08%) viper_call2a.py 536.31 -> 527.37 : -8.94 = -1.667% (+/-0.04%) viper_call2b.py 378.99 -> 377.50 : -1.49 = -0.393% (+/-0.08%) Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/asm: Add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/asmarm: Add asm_arm_ldrh_reg_reg_offset() helper func.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/asmthumb: Add asm_thumb_ldrh_reg_reg_i12_optimised() helper func.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-23py/asmthumb: Fix offset variable name in ldr, ldrh and strh functions.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-19py/emitnative: Provide dedicated local for exception unwind handler ptr.Damien George
This eliminates the need to save and restore the exception unwind handler pointer when calling nlr_push. Signed-off-by: Damien George <damien@micropython.org>
2022-05-19py/emitnative: Simplify generation of code that loads prelude pointer.Damien George
It's possible to use REG_PARENT_ARG_1 instead of REG_LOCAL_3. Signed-off-by: Damien George <damien@micropython.org>
2022-05-19py/asmthumb: Fix PC relative load by sign extending the constant.Damien George
PC relative offsets can be negative, in which case the movw result must be sign extended. Signed-off-by: Damien George <damien@micropython.org>
2022-05-18py: Remove support for MICROPY_PORT_BUILTIN_MODULES.Jim Mussared
This functionality is now replaced with MP_REGISTER_MODULE. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-18py: Make builtin modules use MP_REGISTER_MODULE.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-18extmod: Make extmod modules use MP_REGISTER_MODULE.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-18py/makemoduledefs.py: Allow multiple ways to register a module.Jim Mussared
For example, ussl can come from axtls or mbedtls. If neither are enabled then don't try and set an empty definition twice, and only include it once in MICROPY_REGISTERED_MODULES. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-18py/parse: Allow all constant objects to be used in "X = const(o)".Damien George
Now that constant tuples are supported in the parser, eg (1, True, "str"), it's a small step to allow anything that is a constant to be used with the pattern: from micropython import const X = const(obj) This commit makes the required changes to allow the following types of constants: from micropython import const _INT = const(123) _FLOAT = const(1.2) _COMPLEX = const(3.4j) _STR = const("str") _BYTES = const(b"bytes") _TUPLE = const((_INT, _STR, _BYTES)) _TUPLE2 = const((None, False, True, ..., (), _TUPLE)) Prior to this, only integers could be used in const(...). Signed-off-by: Damien George <damien@micropython.org>
2022-05-18py/compile: De-duplicate constant objects in module's constant table.Damien George
The recent rework of bytecode made all constants global with respect to the module (previously, each function had its own constant table). That means the constant table for a module is shared among all functions/methods/etc within the module. This commit add support to the compiler to de-duplicate constants in this module constant table. So if a constant is used more than once -- eg 1.0 or (None, None) -- then the same object is reused for all instances. For example, if there is code like `print(1.0, 1.0)` then the parser will create two independent constants 1.0 and 1.0. The compiler will then (with this commit) notice they are the same and only put one of them in the constant table. The bytecode will then reuse that constant twice in the print expression. That allows the second 1.0 to be reclaimed by the GC, also means the constant table has one less entry so saves a word. Signed-off-by: Damien George <damien@micropython.org>
2022-05-17py/compile: Allow new qstrs to be allocated at all compiler passes.Damien George
Prior to this commit, all qstrs were required to be allocated (by calling mp_emit_common_use_qstr) in the MP_PASS_SCOPE pass (the first one). But this is an unnecessary restriction, which is lifted by this commit. Lifting the restriction simplifies the compiler because it can allocate qstrs in later passes. This also generates better code, because in some cases (eg when a variable is closed over) the scope of an identifier is not known until a bit later and then the identifier no longer needs its qstr allocated in the global table. Code size is reduced for all ports with this commit. Signed-off-by: Damien George <damien@micropython.org>
2022-05-17py/emitnative: Put a pointer to the native prelude in child_table array.Damien George
Some architectures (like esp32 xtensa) cannot read byte-wise from executable memory. This means the prelude for native functions -- which is usually located after the machine code for the native function -- must be placed in separate memory that can be read byte-wise. Prior to this commit this was achieved by enabling N_PRELUDE_AS_BYTES_OBJ for the emitter and MICROPY_EMIT_NATIVE_PRELUDE_AS_BYTES_OBJ for the runtime. The prelude was then placed in a bytes object, pointed to by the module's constant table. This behaviour is changed by this commit so that a pointer to the prelude is stored either in mp_obj_fun_bc_t.child_table, or in mp_obj_fun_bc_t.child_table[num_children] if num_children > 0. The reasons for doing this are: 1. It decouples the native emitter from runtime requirements, the emitted code no longer needs to know if the system it runs on can/can't read byte-wise from executable memory. 2. It makes all ports have the same emitter behaviour, there is no longer the N_PRELUDE_AS_BYTES_OBJ option. 3. The module's constant table is now used only for actual constants in the Python code. This allows further optimisations to be done with the constants (eg constant deduplication). Code size change for those ports that enable the native emitter: unix x64: +80 +0.015% stm32: +24 +0.004% PYBV10 esp8266: +88 +0.013% GENERIC esp32: -20 -0.002% GENERIC[incl -112(data)] rp2: +32 +0.005% PICO Signed-off-by: Damien George <damien@micropython.org>
2022-05-17py/bc: Provide separate code-state setup funcs for bytecode and native.Damien George
mpy-cross will now generate native code based on the size of mp_code_state_native_t, and the runtime will use this struct to calculate the offset of the .state field. This makes native code generation and execution (which rely on this struct) independent to the settings MICROPY_STACKLESS and MICROPY_PY_SYS_SETTRACE, both of which change the size of the mp_code_state_t struct. Fixes issue #5059. Signed-off-by: Damien George <damien@micropython.org>
2022-05-17py/asmx64: Support full range of regs in asm_x64_lea_disp_to_r64.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-17py/persistentcode: Remove unicode feature flag from .mpy file.Damien George
Prior to this commit, even with unicode disabled .py and .mpy files could contain unicode characters, eg by entering them directly in a string as utf-8 encoded. The only thing the compiler disallowed (with unicode disabled) was using \uxxxx and \Uxxxxxxxx notation to specify a character within a string with value >= 0x100; that would give a SyntaxError. With this change mpy-cross will now accept \u and \U notation to insert a character with value >= 0x100 into a string (because the -mno-unicode option is now gone, there's no way to forbid this). The runtime will happily work with strings with such characters, just like it already works with strings with characters that were utf-8 encoded directly. This change simplifies things because there are no longer any feature flags in .mpy files, and any bytecode .mpy will now run on any target. Signed-off-by: Damien George <damien@micropython.org>
2022-05-17py/persistentcode: Remove obsolete comment about qstr window size.Damien George
This was made obsolete in f2040bfc7ee033e48acef9f289790f3b4e6b74e5 Signed-off-by: Damien George <damien@micropython.org>
2022-05-05all: Reformat remaining C code that doesn't have a space after a comma.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-05py/objmodule: Move stray #include to top of file.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-05py/malloc: Introduce m_tracked_calloc, m_tracked_free functions.Damien George
Enabled by MICROPY_TRACKED_ALLOC. Signed-off-by: Damien George <damien@micropython.org>