mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 15:13:41 +02:00
* Node-stripping optimisation in "TBlockNode.simplify" now uses "has_child_of_type" to determine stop point
This commit is contained in:
parent
a91c1ab627
commit
59ff8a0f65
@ -763,6 +763,9 @@ implementation
|
||||
|
||||
|
||||
function tblocknode.simplify(forinline : boolean): tnode;
|
||||
const
|
||||
NodeStripTerminators = [labeln, asmn, tempcreaten, tempdeleten];
|
||||
|
||||
var
|
||||
n, p, first, last: tstatementnode;
|
||||
{$ifdef break_inlining}
|
||||
@ -819,7 +822,7 @@ implementation
|
||||
p := TStatementNode(n.Next);
|
||||
while Assigned(p) do
|
||||
begin
|
||||
if (TStatementNode(p).left.nodetype in [labeln, asmn, tempcreaten, tempdeleten, blockn]) then
|
||||
if has_node_of_type(TStatementNode(p).left, NodeStripTerminators) then
|
||||
Break;
|
||||
|
||||
last := p;
|
||||
|
Loading…
Reference in New Issue
Block a user