瀏覽代碼

* 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
            (current_procinfo.procdef.proctypeoption=potype_constructor) then
           exit;
+        if (location.loc=LOC_REFERENCE) then
+          tg.ungetiftemp(current_asmdata.CurrAsmList,location.reference);
+        if assigned(funcretnode) then
+          exit;
         case resultdef.size of
           0:
             ;