+ added method TCGPara.locations_count

git-svn-id: trunk@24530 -
This commit is contained in:
nickysn 2013-05-19 18:37:55 +00:00
parent b9084a22ca
commit 3e22ec43b5

View File

@ -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);