mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 20:20:16 +02:00
+ TDFABuilder.redodfainfo
This commit is contained in:
parent
12a2c56461
commit
d0fdda6da7
@ -45,6 +45,7 @@ unit optdfa;
|
|||||||
procedure resetdfainfo(node : tnode);
|
procedure resetdfainfo(node : tnode);
|
||||||
|
|
||||||
procedure createdfainfo(node : tnode);
|
procedure createdfainfo(node : tnode);
|
||||||
|
procedure redodfainfo(node : tnode);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -659,6 +660,14 @@ unit optdfa;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TDFABuilder.redodfainfo(node: tnode);
|
||||||
|
begin
|
||||||
|
resetdfainfo(node);
|
||||||
|
createdfainfo(node);
|
||||||
|
include(current_procinfo.flags,pi_dfaavailable);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor TDFABuilder.Destroy;
|
destructor TDFABuilder.Destroy;
|
||||||
begin
|
begin
|
||||||
Resultnode.free;
|
Resultnode.free;
|
||||||
|
@ -1218,11 +1218,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if RedoDFA then
|
if RedoDFA then
|
||||||
begin
|
dfabuilder.redodfainfo(code);
|
||||||
dfabuilder.resetdfainfo(code);
|
|
||||||
dfabuilder.createdfainfo(code);
|
|
||||||
include(flags,pi_dfaavailable);
|
|
||||||
end;
|
|
||||||
|
|
||||||
if cs_opt_forloop in current_settings.optimizerswitches then
|
if cs_opt_forloop in current_settings.optimizerswitches then
|
||||||
RedoDFA:=OptimizeForLoop(code);
|
RedoDFA:=OptimizeForLoop(code);
|
||||||
@ -1230,11 +1226,7 @@ implementation
|
|||||||
RedoDFA:=ConvertForLoops(code) or RedoDFA;
|
RedoDFA:=ConvertForLoops(code) or RedoDFA;
|
||||||
|
|
||||||
if RedoDFA then
|
if RedoDFA then
|
||||||
begin
|
dfabuilder.redodfainfo(code);
|
||||||
dfabuilder.resetdfainfo(code);
|
|
||||||
dfabuilder.createdfainfo(code);
|
|
||||||
include(flags,pi_dfaavailable);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ when life info is available, we can give more sophisticated warning about uninitialized
|
{ when life info is available, we can give more sophisticated warning about uninitialized
|
||||||
variables ...
|
variables ...
|
||||||
|
Loading…
Reference in New Issue
Block a user