Revert "py/emitnative: Don't store prelude at end of machine code if..."

This reverts commit 7e8222ae06.

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>
This commit is contained in:
Damien George 2022-04-14 14:02:09 +10:00
parent 8045ac07f5
commit b8d959d6cf
1 changed files with 0 additions and 6 deletions

View File

@ -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,