From 5b64e5b9579cadd9baac768a773823d71914f3b2 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Wed, 18 Oct 2023 01:51:11 +0300 Subject: [PATCH] * insert the wasm locals asm list after resolve_labels_complex, since it will (in the future) be able to allocate more locals, in order to resolve the branches and goto --- compiler/wasm32/cpupi.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/wasm32/cpupi.pas b/compiler/wasm32/cpupi.pas index 17548d4eff..f6e50b0ba8 100644 --- a/compiler/wasm32/cpupi.pas +++ b/compiler/wasm32/cpupi.pas @@ -684,8 +684,6 @@ implementation labels_resolved: Boolean; begin localslist:=prepare_locals; - insert_localslist(aktproccode,localslist); - localslist.Free; replace_local_frame_pointer(aktproccode); @@ -695,6 +693,9 @@ implementation {$endif DEBUG_WASM_GOTO} resolve_labels_complex(aktproccode); + insert_localslist(aktproccode,localslist); + localslist.Free; + inherited postprocess_code; end;