diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-21 23:28:34 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-21 23:28:34 +0000 |
commit | 1903b037de2fb3e75826406b46f055acb70963fa (patch) | |
tree | 604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /compiler/paramgr.pas | |
parent | ad1141d52f8353457053b925cd674fe1d5c4eafc (diff) | |
parent | 953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff) | |
download | fpc-blocks.tar.gz |
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/paramgr.pas')
-rw-r--r-- | compiler/paramgr.pas | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/paramgr.pas b/compiler/paramgr.pas index 199231ce6b..bb634564a6 100644 --- a/compiler/paramgr.pas +++ b/compiler/paramgr.pas @@ -179,15 +179,14 @@ implementation { true if uses a parameter as return value } function tparamanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean; begin + { This handles all managed types, including COM interfaces and Variants } if handle_common_ret_in_param(def,pd,result) then exit; ret_in_param:=(def.typ=arraydef) or (def.typ=recorddef) or (def.typ=stringdef) or ((def.typ=procvardef) and not tprocvardef(def).is_addressonly) or - { interfaces are also passed by reference to be compatible with delphi and COM } - ((def.typ=objectdef) and (is_object(def) or is_interface(def) or is_dispinterface(def))) or - (def.typ=variantdef) or + ((def.typ=objectdef) and (is_object(def))) or ((def.typ=setdef) and not is_smallset(def)); end; @@ -420,7 +419,12 @@ implementation newparaloc^.loc:=paraloc^.loc; case newparaloc^.loc of LOC_REGISTER : - newparaloc^.register:=cg.getintregister(list,paraloc^.size); + begin + if (vo_has_explicit_paraloc in parasym.varoptions) and (paraloc^.loc = LOC_REGISTER) then + newparaloc^.register:=paraloc^.register + else + newparaloc^.register:=cg.getintregister(list,paraloc^.size); + end; LOC_FPUREGISTER : newparaloc^.register:=cg.getfpuregister(list,paraloc^.size); LOC_MMREGISTER : |