mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* don't pass TP-style objects as HFA or similar, because the calling
convention code is triggered before the object structure has been finalised, so the result can be different in the interface and implementation. To solve this, something like r20161 has to be implemented for TP-style objects git-svn-id: trunk@29930 -
This commit is contained in:
parent
620af1732a
commit
70fc5dcee3
@ -131,12 +131,8 @@ unit cpupara;
|
||||
inc(elecount);
|
||||
result:=true;
|
||||
end;
|
||||
recorddef,
|
||||
objectdef:
|
||||
recorddef:
|
||||
begin
|
||||
if (p.typ=objectdef) and
|
||||
not is_object(p) then
|
||||
exit;
|
||||
for i:=0 to tabstractrecorddef(p).symtable.symlist.count-1 do
|
||||
begin
|
||||
sym:=tsym(tabstractrecorddef(p).symtable.symlist[i]);
|
||||
@ -197,11 +193,7 @@ unit cpupara;
|
||||
else
|
||||
getparaloc:=LOC_MMREGISTER;
|
||||
objectdef:
|
||||
if not is_object(p) or
|
||||
not is_hfa(p,hfabasedef) then
|
||||
getparaloc:=LOC_REGISTER
|
||||
else
|
||||
getparaloc:=LOC_MMREGISTER;
|
||||
getparaloc:=LOC_REGISTER;
|
||||
stringdef:
|
||||
if is_shortstring(p) or is_longstring(p) then
|
||||
getparaloc:=LOC_REFERENCE
|
||||
@ -241,10 +233,7 @@ unit cpupara;
|
||||
end;
|
||||
case def.typ of
|
||||
objectdef:
|
||||
result:=
|
||||
is_object(def) and
|
||||
not is_hfa(def,hfabasedef) and
|
||||
(def.size>16);
|
||||
result:=is_object(def);
|
||||
recorddef:
|
||||
{ ABI: any composite > 16 bytes that not a hfa/hva
|
||||
Special case: MWPascal, which passes all const parameters by
|
||||
|
Loading…
Reference in New Issue
Block a user