py/profile: Remove the requirement to disable MICROPY_COMP_CONST.
The only reason that const had to be disabled was to make the test output match CPython when const was involved. Instead, this commit fixes the test to handle the lines where const is used. Also: - remove the special handling for MICROPY_PERSISTENT_CODE_SAVE in unix/mpconfigport.h, and make this automatic. - move the check for MICROPY_PERSISTENT_CODE_SAVE to where it's used (like we do for other similar checks) and add a comment explaining it. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
4a3fdc0e76
commit
b2b5bcce28
@@ -31,6 +31,12 @@
|
||||
|
||||
#if MICROPY_PY_SYS_SETTRACE
|
||||
|
||||
#if !MICROPY_PERSISTENT_CODE_SAVE
|
||||
// The settrace feature requires that we maintain additional metadata on the raw
|
||||
// code object which is normally only done when writing .mpy files.
|
||||
#error "MICROPY_PY_SYS_SETTRACE requires MICROPY_PERSISTENT_CODE_SAVE to be enabled"
|
||||
#endif
|
||||
|
||||
#define prof_trace_cb MP_STATE_THREAD(prof_trace_callback)
|
||||
#define QSTR_MAP(context, idx) (context->constants.qstr_table[idx])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user