diff options
| author | Damien George <damien@micropython.org> | 2022-04-14 14:02:09 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-04-14 14:06:38 +1000 |
| commit | b8d959d6cf6afab4277a7e094be5107f27105b17 (patch) | |
| tree | c9ea4456cbc52e642956ca82de9dfe357452d258 | |
| parent | 8045ac07f599c0ccc447c88a0b778f704b497559 (diff) | |
Revert "py/emitnative: Don't store prelude at end of machine code if..."
This reverts commit 7e8222ae063d78ae8f901bb0f9fef663edd2edb6.
The prelude data must exist somewhere in the native code so load_raw_code
and mpy-tool.py can access and parse it.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | py/emitnative.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/py/emitnative.c b/py/emitnative.c index 286398404..056a1a8a6 100644 --- a/py/emitnative.c +++ b/py/emitnative.c @@ -723,13 +723,7 @@ STATIC bool emit_native_end_pass(emit_t *emit) { if (emit->pass == MP_PASS_EMIT) { void *f = mp_asm_base_get_code(&emit->as->base); - #if N_PRELUDE_AS_BYTES_OBJ - // Keep only the machine code, not the prelude, which is in a separate bytes object. - mp_uint_t f_len = emit->prelude_offset; - #else - // Keep both the machine code and the prelude. mp_uint_t f_len = mp_asm_base_get_code_size(&emit->as->base); - #endif mp_emit_glue_assign_native(emit->scope->raw_code, emit->do_viper_types ? MP_CODE_NATIVE_VIPER : MP_CODE_NATIVE_PY, |
