|
@@ -272,7 +272,7 @@ uses
|
|
p:=tai(srclist.First);
|
|
p:=tai(srclist.First);
|
|
if not assigned(p) then
|
|
if not assigned(p) then
|
|
internalerror(2023100302);
|
|
internalerror(2023100302);
|
|
- if (p.typ=ait_instruction) and (taicpu(p).opcode in [a_else,a_end_if]) then
|
|
|
|
|
|
+ if (p.typ=ait_instruction) and (taicpu(p).opcode in [a_else,a_end_if,a_end_block,a_end_loop,a_end_try,a_catch,a_catch_all]) then
|
|
begin
|
|
begin
|
|
srclist.Remove(p);
|
|
srclist.Remove(p);
|
|
case taicpu(p).opcode of
|
|
case taicpu(p).opcode of
|
|
@@ -539,12 +539,10 @@ uses
|
|
Done:=False;
|
|
Done:=False;
|
|
repeat
|
|
repeat
|
|
pp:=tai(srclist.First);
|
|
pp:=tai(srclist.First);
|
|
- if (pp.typ=ait_instruction) and (taicpu(pp).opcode in [a_catch,a_catch_all,a_end_try]) then
|
|
|
|
|
|
+ if (pp.typ=ait_instruction) and (taicpu(pp).opcode=a_end_try) then
|
|
begin
|
|
begin
|
|
srclist.Remove(pp);
|
|
srclist.Remove(pp);
|
|
Done:=True;
|
|
Done:=True;
|
|
- if taicpu(pp).opcode in [a_catch,a_catch_all] then
|
|
|
|
- internalerror(2023100313);
|
|
|
|
end
|
|
end
|
|
else
|
|
else
|
|
catch_all_asmlist.Concat(wasm_convert_first_item_to_structured(srclist));
|
|
catch_all_asmlist.Concat(wasm_convert_first_item_to_structured(srclist));
|