mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 07:59:15 +02:00
* correctly set the line info for the implicitly generated entry code nodes,
and update the code to also set it for some implicitly generated exit code git-svn-id: trunk@34393 -
This commit is contained in:
parent
ffd4870a60
commit
eb2ce85269
@ -872,6 +872,7 @@ implementation
|
|||||||
{ Generate procedure by combining init+body+final,
|
{ Generate procedure by combining init+body+final,
|
||||||
depending on the implicit finally we need to add
|
depending on the implicit finally we need to add
|
||||||
an try...finally...end wrapper }
|
an try...finally...end wrapper }
|
||||||
|
current_filepos:=entrypos;
|
||||||
newblock:=internalstatements(newstatement);
|
newblock:=internalstatements(newstatement);
|
||||||
{ initialization is common for all cases }
|
{ initialization is common for all cases }
|
||||||
addstatement(newstatement,loadpara_asmnode);
|
addstatement(newstatement,loadpara_asmnode);
|
||||||
@ -925,7 +926,9 @@ implementation
|
|||||||
have managed variables/temps }
|
have managed variables/temps }
|
||||||
maybe_add_constructor_wrapper(code,
|
maybe_add_constructor_wrapper(code,
|
||||||
cs_implicit_exceptions in current_settings.moduleswitches);
|
cs_implicit_exceptions in current_settings.moduleswitches);
|
||||||
|
current_filepos:=entrypos;
|
||||||
addstatement(newstatement,code);
|
addstatement(newstatement,code);
|
||||||
|
current_filepos:=exitpos;
|
||||||
if assigned(nestedexitlabel) then
|
if assigned(nestedexitlabel) then
|
||||||
addstatement(newstatement,clabelnode.create(cnothingnode.create,nestedexitlabel));
|
addstatement(newstatement,clabelnode.create(cnothingnode.create,nestedexitlabel));
|
||||||
addstatement(newstatement,exitlabel_asmnode);
|
addstatement(newstatement,exitlabel_asmnode);
|
||||||
@ -938,7 +941,10 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if not final_used then
|
if not final_used then
|
||||||
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,newstatement);
|
begin
|
||||||
|
current_filepos:=exitpos;
|
||||||
|
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,newstatement);
|
||||||
|
end;
|
||||||
do_firstpass(newblock);
|
do_firstpass(newblock);
|
||||||
code:=newblock;
|
code:=newblock;
|
||||||
current_filepos:=oldfilepos;
|
current_filepos:=oldfilepos;
|
||||||
|
Loading…
Reference in New Issue
Block a user