mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 20:08:52 +02:00
* generate correct dfa for subroutines declared as safecall
This commit is contained in:
parent
031c16dd3c
commit
3db1415a44
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user