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>
This commit is contained in:
parent
8045ac07f5
commit
b8d959d6cf
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user