|
@@ -143,13 +143,15 @@ implementation
|
|
|
{ We can skip passing the parameter when:
|
|
|
the parameter can be optimized as unused
|
|
|
and the target does not strictly require all parameters (has_strict_proc_signature = false)
|
|
|
- and fixed stack is used
|
|
|
+ and
|
|
|
+ fixed stack is used
|
|
|
or the parameter is in a register
|
|
|
- or the parameter is $parentfp. }
|
|
|
+ or the parameter is $parentfp and po_delphi_nested_cc is set for the routine. }
|
|
|
result:=paramanager.can_opt_unused_para(parasym) and
|
|
|
not paramanager.has_strict_proc_signature and
|
|
|
(paramanager.use_fixed_stack or
|
|
|
- (vo_is_parentfp in parasym.varoptions) or
|
|
|
+ ((vo_is_parentfp in parasym.varoptions) and
|
|
|
+ (po_delphi_nested_cc in tabstractprocdef(parasym.owner.defowner).procoptions)) or
|
|
|
(parasym.paraloc[callerside].Location^.Loc in [LOC_REGISTER,LOC_CREGISTER]));
|
|
|
end;
|
|
|
|