From 9f077d4ac04479b4bc3e46a3eb8465d1916df5df Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Wed, 20 Oct 2021 10:40:21 +0300 Subject: [PATCH] * leave unresolved branches in the asm output, when the compiler is compiled with -dEXTDEBUG --- compiler/wasm32/cpupi.pas | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/compiler/wasm32/cpupi.pas b/compiler/wasm32/cpupi.pas index 85f6a63604..d167e881ba 100644 --- a/compiler/wasm32/cpupi.pas +++ b/compiler/wasm32/cpupi.pas @@ -480,9 +480,14 @@ implementation (instr.oper[0]^.ref^.index<>NR_NO) or (instr.oper[0]^.ref^.offset<>0) then internalerror(2021102006); - if instr.oper[0]^.ref^.symbol.nestingdepth=-1 then - internalerror(2021102007); - instr.loadconst(0,cur_nesting_depth-instr.oper[0]^.ref^.symbol.nestingdepth); + if instr.oper[0]^.ref^.symbol.nestingdepth<>-1 then + instr.loadconst(0,cur_nesting_depth-instr.oper[0]^.ref^.symbol.nestingdepth) + else + begin +{$ifndef EXTDEBUG} + internalerror(2021102007); +{$endif EXTDEBUG} + end; end; end;