mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 14:20:05 +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,
|
||||
depending on the implicit finally we need to add
|
||||
an try...finally...end wrapper }
|
||||
current_filepos:=entrypos;
|
||||
newblock:=internalstatements(newstatement);
|
||||
{ initialization is common for all cases }
|
||||
addstatement(newstatement,loadpara_asmnode);
|
||||
@ -925,7 +926,9 @@ implementation
|
||||
have managed variables/temps }
|
||||
maybe_add_constructor_wrapper(code,
|
||||
cs_implicit_exceptions in current_settings.moduleswitches);
|
||||
current_filepos:=entrypos;
|
||||
addstatement(newstatement,code);
|
||||
current_filepos:=exitpos;
|
||||
if assigned(nestedexitlabel) then
|
||||
addstatement(newstatement,clabelnode.create(cnothingnode.create,nestedexitlabel));
|
||||
addstatement(newstatement,exitlabel_asmnode);
|
||||
@ -938,7 +941,10 @@ implementation
|
||||
end;
|
||||
end;
|
||||
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);
|
||||
code:=newblock;
|
||||
current_filepos:=oldfilepos;
|
||||
|
Loading…
Reference in New Issue
Block a user