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