* generate correct dfa for subroutines declared as safecall

This commit is contained in:
florian 2022-11-05 16:56:05 +01:00
parent 031c16dd3c
commit 3db1415a44
2 changed files with 10 additions and 0 deletions

View File

@ -83,6 +83,7 @@ interface
function load_high_value_node(vs:tparavarsym):tnode;
function load_self_node:tnode;
function load_result_node:tnode;
function load_safecallresult_node:tnode;
function load_self_pointer_node:tnode;
function load_vmt_pointer_node:tnode;
function is_self_node(p:tnode):boolean;
@ -583,6 +584,13 @@ implementation
end;
function load_safecallresult_node: tnode;
begin
result:=gen_load_var(get_local_or_para_sym('safecallresult'));
typecheckpass(result);
end;
function load_self_pointer_node:tnode;
var
srsym : tabstractvarsym;

View File

@ -642,6 +642,8 @@ unit optdfa;
begin
if current_procinfo.procdef.proctypeoption=potype_constructor then
resultnode:=load_self_node
else if current_procinfo.procdef.proccalloption=pocall_safecall then
resultnode:=load_safecallresult_node
else
resultnode:=load_result_node;
resultnode.allocoptinfo;