mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:46:00 +02:00
* fixed flow control handling in case of empty try-blocks and in case of
no default exception catching block git-svn-id: branches/jvmbackend@18576 -
This commit is contained in:
parent
1dca48bce5
commit
8ec21eb426
@ -131,7 +131,6 @@ implementation
|
|||||||
{ try block }
|
{ try block }
|
||||||
{ set control flow labels for the try block }
|
{ set control flow labels for the try block }
|
||||||
|
|
||||||
flowcontrol:=[fc_inflowcontrol];
|
|
||||||
hlcg.a_label(current_asmdata.CurrAsmList,begintrylabel);
|
hlcg.a_label(current_asmdata.CurrAsmList,begintrylabel);
|
||||||
secondpass(left);
|
secondpass(left);
|
||||||
hlcg.a_label(current_asmdata.CurrAsmList,endtrylabel);
|
hlcg.a_label(current_asmdata.CurrAsmList,endtrylabel);
|
||||||
@ -177,7 +176,9 @@ implementation
|
|||||||
current_except_loc.loc:=LOC_INVALID;
|
current_except_loc.loc:=LOC_INVALID;
|
||||||
|
|
||||||
exceptflowcontrol:=flowcontrol;
|
exceptflowcontrol:=flowcontrol;
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
exceptflowcontrol:=flowcontrol;
|
||||||
hlcg.a_label(current_asmdata.CurrAsmList,endexceptlabel);
|
hlcg.a_label(current_asmdata.CurrAsmList,endexceptlabel);
|
||||||
|
|
||||||
{ restore all saved labels }
|
{ restore all saved labels }
|
||||||
@ -321,7 +322,9 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
{ reason: no exception occurred }
|
{ reason: no exception occurred }
|
||||||
hlcg.a_load_const_reg(current_asmdata.CurrAsmList,s32inttype,0,reasonbuf);
|
hlcg.a_load_const_reg(current_asmdata.CurrAsmList,s32inttype,0,reasonbuf);
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
tryflowcontrol:=[fc_inflowcontrol];
|
||||||
|
|
||||||
{ begin of the finally code }
|
{ begin of the finally code }
|
||||||
hlcg.a_label(current_asmdata.CurrAsmList,finallylabel);
|
hlcg.a_label(current_asmdata.CurrAsmList,finallylabel);
|
||||||
|
Loading…
Reference in New Issue
Block a user