瀏覽代碼

* fixed JVM stack height calculation after calls returning an
implicit pointer tpe

git-svn-id: trunk@48832 -

Jonas Maebe 4 年之前
父節點
當前提交
ab0531f0ce
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/jvm/hlcgcpu.pas

+ 4 - 0
compiler/jvm/hlcgcpu.pas

@@ -2292,6 +2292,10 @@ implementation
       { a constructor doesn't actually return a value in the jvm }
       if (tabstractprocdef(pd).proctypeoption=potype_constructor) then
         totalremovesize:=paraheight
+      else if jvmimplicitpointertype(realresdef) then
+        totalremovesize:=paraheight-1
+      else if is_void(realresdef) then
+        totalremovesize:=paraheight
       else
         { even a byte takes up a full stackslot -> align size to multiple of 4 }
         totalremovesize:=paraheight-(align(realresdef.size,4) shr 2);