DEADSOFTWARE

Fix preverification error on jvm when used procedure types
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Tue, 29 Sep 2015 18:04:20 +0000 (21:04 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Tue, 29 Sep 2015 18:04:20 +0000 (21:04 +0300)
gpcp/JavaMaker.cp

index 23abf98e296a7ba270dc394cc203a4ef27ec135a..0a9d699b20e52705a43078b050eb4e8cb4b242b2 100644 (file)
@@ -385,6 +385,7 @@ MODULE JavaMaker;
     VAR pType : Ty.Procedure; (* The procedure type that is being emitted *)\r
            proxy : Ty.Record;    (* The record that stands for the proc-type *)\r
                invoke : Id.MthId;    (* The abstract invoke method for this      *)\r
     VAR pType : Ty.Procedure; (* The procedure type that is being emitted *)\r
            proxy : Ty.Record;    (* The record that stands for the proc-type *)\r
                invoke : Id.MthId;    (* The abstract invoke method for this      *)\r
+               junk : INTEGER;\r
   BEGIN\r
     pType := this.prcT;\r
        proxy := pType.hostClass;\r
   BEGIN\r
     pType := this.prcT;\r
        proxy := pType.hostClass;\r
@@ -396,6 +397,11 @@ MODULE JavaMaker;
        out.RecMakeInit(proxy, NIL);\r
        out.CallSuperCtor(proxy, NIL);\r
        out.VoidTail();\r
        out.RecMakeInit(proxy, NIL);\r
        out.CallSuperCtor(proxy, NIL);\r
        out.VoidTail();\r
+       \r
+       out.CopyProcHead(proxy);\r
+       junk := out.newLocal();\r
+       junk := out.newLocal();\r
+       out.VoidTail();\r
 \r
    (* Emit the abstract Invoke method *)\r
     invoke := Ju.getProcVarInvoke(pType);\r
 \r
    (* Emit the abstract Invoke method *)\r
     invoke := Ju.getProcVarInvoke(pType);\r