* fixed open array with cdecl

* fixed finalize call with unused function return
This commit is contained in:
peter 2000-09-10 20:18:06 +00:00
parent 7e19f03f6f
commit 24d5c13456

View File

@ -215,12 +215,16 @@ implementation
if tempdeftype=filedef then if tempdeftype=filedef then
CGMessage(cg_e_file_must_call_by_reference); CGMessage(cg_e_file_must_call_by_reference);
{ open array must always push the address, this is needed to { open array must always push the address, this is needed to
also push addr of small arrays (PFV) } also push addr of small open arrays and with cdecl functions (PFV) }
if (
if ((assigned(defcoll^.paratype.def) and assigned(defcoll^.paratype.def) and
is_open_array(defcoll^.paratype.def)) or (is_open_array(defcoll^.paratype.def) or
push_addr_param(p^.resulttype)) and is_array_of_const(defcoll^.paratype.def))
not is_cdecl then ) or
(
push_addr_param(p^.resulttype) and
not is_cdecl
) then
begin begin
maybe_push_high; maybe_push_high;
inc(pushedparasize,4); inc(pushedparasize,4);
@ -1351,7 +1355,7 @@ implementation
if (p^.resulttype^.needs_inittable) and if (p^.resulttype^.needs_inittable) and
( (p^.resulttype^.deftype<>objectdef) or ( (p^.resulttype^.deftype<>objectdef) or
not(pobjectdef(p^.resulttype)^.is_class)) then not(pobjectdef(p^.resulttype)^.is_class)) then
finalize(p^.resulttype,p^.location.reference,ret_in_param(p^.resulttype)); finalize(p^.resulttype,p^.location.reference,false);
{ release unused temp } { release unused temp }
ungetiftemp(p^.location.reference) ungetiftemp(p^.location.reference)
end end
@ -1584,7 +1588,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.7 2000-08-03 14:27:04 jonas Revision 1.8 2000-09-10 20:18:06 peter
* fixed open array with cdecl
* fixed finalize call with unused function return
Revision 1.7 2000/08/03 14:27:04 jonas
* save/reset/restore regvar info around inlined code * save/reset/restore regvar info around inlined code
Revision 1.5 2000/07/27 13:03:35 jonas Revision 1.5 2000/07/27 13:03:35 jonas