mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
+ added amfrtDeleteAi, support deleting instructions in map_structured_asmlist_inner
This commit is contained in:
parent
0f07c966b6
commit
9584348c40
@ -42,12 +42,13 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
twasmstruc_stack = class;
|
twasmstruc_stack = class;
|
||||||
TAsmMapFuncResultType = (amfrtNoChange, amfrtNewAi, amfrtNewList);
|
TAsmMapFuncResultType = (amfrtNoChange, amfrtNewAi, amfrtNewList, amfrtDeleteAi);
|
||||||
TAsmMapFuncResult = record
|
TAsmMapFuncResult = record
|
||||||
case typ: TAsmMapFuncResultType of
|
case typ: TAsmMapFuncResultType of
|
||||||
amfrtNoChange: ();
|
amfrtNoChange: ();
|
||||||
amfrtNewAi: (newai: tai);
|
amfrtNewAi: (newai: tai);
|
||||||
amfrtNewList: (newlist: TAsmList);
|
amfrtNewList: (newlist: TAsmList);
|
||||||
|
amfrtDeleteAi: ();
|
||||||
end;
|
end;
|
||||||
TAsmMapFunc = function(ai: tai; blockstack: twasmstruc_stack): TAsmMapFuncResult of object;
|
TAsmMapFunc = function(ai: tai; blockstack: twasmstruc_stack): TAsmMapFuncResult of object;
|
||||||
TWasmLocalAllocator = function(wbt: TWasmBasicType): Integer of object;
|
TWasmLocalAllocator = function(wbt: TWasmBasicType): Integer of object;
|
||||||
@ -2890,6 +2891,12 @@ uses
|
|||||||
l.Remove(p);
|
l.Remove(p);
|
||||||
p:=q;
|
p:=q;
|
||||||
end;
|
end;
|
||||||
|
amfrtDeleteAi:
|
||||||
|
begin
|
||||||
|
q:=p;
|
||||||
|
p:=tai(p.next);
|
||||||
|
l.Remove(q);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -2918,6 +2925,12 @@ uses
|
|||||||
l.Remove(p);
|
l.Remove(p);
|
||||||
p:=q;
|
p:=q;
|
||||||
end;
|
end;
|
||||||
|
amfrtDeleteAi:
|
||||||
|
begin
|
||||||
|
q:=p;
|
||||||
|
p:=tai(p.next);
|
||||||
|
l.Remove(q);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user