* arrays are always passed by addr

* cdecl array of const is passed by value so it doesn't allocate
    anything
This commit is contained in:
peter 2005-02-06 18:59:15 +00:00
parent 0ed0de65d4
commit adc66eaf55

View File

@ -109,7 +109,9 @@ unit cpupara;
loc1:=LOC_REGISTER; loc1:=LOC_REGISTER;
end; end;
arraydef: arraydef:
loc1:=LOC_REFERENCE; begin
loc1:=LOC_REFERENCE;
end;
variantdef: variantdef:
loc1:=LOC_REFERENCE; loc1:=LOC_REFERENCE;
stringdef: stringdef:
@ -182,13 +184,12 @@ unit cpupara;
result:=(def.size>sizeof(aint)); result:=(def.size>sizeof(aint));
arraydef : arraydef :
begin begin
result:=( result:=not(
(tarraydef(def).highrange>=tarraydef(def).lowrange) and { cdecl array of const need to be ignored and therefor be puhsed
(def.size>sizeof(aint)) as value parameter with length 0 }
) or (calloption in [pocall_cdecl,pocall_cppdecl]) and
is_open_array(def) or is_array_of_const(def)
is_array_of_const(def) or );
is_array_constructor(def);
end; end;
objectdef : objectdef :
result:=is_object(def); result:=is_object(def);
@ -492,7 +493,12 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.16 2005-02-03 20:04:49 peter Revision 1.17 2005-02-06 18:59:15 peter
* arrays are always passed by addr
* cdecl array of const is passed by value so it doesn't allocate
anything
Revision 1.16 2005/02/03 20:04:49 peter
* push_addr_param must be defined per target * push_addr_param must be defined per target
Revision 1.15 2005/02/03 18:32:25 peter Revision 1.15 2005/02/03 18:32:25 peter