Bläddra i källkod

* 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 år sedan
förälder
incheckning
9de14768bb
1 ändrade filer med 4 tillägg och 0 borttagningar
  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:
             ;
             ;