mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 07:39:25 +02:00
+ added method TCGPara.locations_count
git-svn-id: trunk@24530 -
This commit is contained in:
parent
b9084a22ca
commit
3e22ec43b5
@ -72,6 +72,8 @@ unit parabase;
|
||||
register : tregister);
|
||||
end;
|
||||
|
||||
{ TCGPara }
|
||||
|
||||
TCGPara = object
|
||||
Def : tdef; { Type of the parameter }
|
||||
Location : PCGParalocation;
|
||||
@ -88,6 +90,7 @@ unit parabase;
|
||||
procedure check_simple_location;
|
||||
function add_location:pcgparalocation;
|
||||
procedure get_location(var newloc:tlocation);
|
||||
function locations_count:integer;
|
||||
|
||||
procedure buildderef;
|
||||
procedure deref;
|
||||
@ -257,6 +260,20 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function TCGPara.locations_count: integer;
|
||||
var
|
||||
hlocation: pcgparalocation;
|
||||
begin
|
||||
result:=0;
|
||||
hlocation:=location;
|
||||
while assigned(hlocation) do
|
||||
begin
|
||||
inc(result);
|
||||
hlocation:=hlocation^.next;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TCGPara.buildderef;
|
||||
begin
|
||||
defderef.build(def);
|
||||
|
Loading…
Reference in New Issue
Block a user