소스 검색

* don't skip pushing self parameters for methods of empty structures

git-svn-id: branches/jvmbackend@18587 -
Jonas Maebe 14 년 전
부모
커밋
874095a1c0
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      compiler/ncgcal.pas

+ 5 - 2
compiler/ncgcal.pas

@@ -138,8 +138,11 @@ implementation
 
 
     procedure tcgcallparanode.push_value_para;
     procedure tcgcallparanode.push_value_para;
       begin
       begin
-        { we've nothing to push when the size of the parameter is 0 }
-        if left.resultdef.size=0 then
+        { we've nothing to push when the size of the parameter is 0
+          -- except in case of the self parameter of an emptry record on e.g.
+             the JVM target }
+        if (left.resultdef.size=0) and
+           not(vo_is_self in parasym.varoptions) then
           exit;
           exit;
 
 
         { Move flags and jump in register to make it less complex }
         { Move flags and jump in register to make it less complex }