Преглед изворни кода

* free temp location allocated for function result if not used
* don't free function result space on stack twice if the result
is not used but a the same time has already been stored in a
temporary funcretnode location

git-svn-id: branches/jvmbackend@18556 -

Jonas Maebe пре 14 година
родитељ
комит
9de14768bb
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      compiler/jvm/njvmcal.pas

+ 4 - 0
compiler/jvm/njvmcal.pas

@@ -166,6 +166,10 @@ implementation
         if (tabstractprocdef(procdefinition).proctypeoption=potype_constructor) and
         if (tabstractprocdef(procdefinition).proctypeoption=potype_constructor) and
            (current_procinfo.procdef.proctypeoption=potype_constructor) then
            (current_procinfo.procdef.proctypeoption=potype_constructor) then
           exit;
           exit;
+        if (location.loc=LOC_REFERENCE) then
+          tg.ungetiftemp(current_asmdata.CurrAsmList,location.reference);
+        if assigned(funcretnode) then
+          exit;
         case resultdef.size of
         case resultdef.size of
           0:
           0:
             ;
             ;