Browse Source

* write extended to ppu file
* new version 0.99.7

peter 27 years ago
parent
commit
befed16714
7 changed files with 65 additions and 34 deletions
  1. 3 3
      bugs/readme.txt
  2. 6 2
      compiler/aasm.pas
  3. 6 2
      compiler/pdecl.pas
  4. 6 2
      compiler/pexpr.pas
  5. 26 12
      compiler/ppu.pas
  6. 9 8
      compiler/symppu.inc
  7. 9 5
      compiler/symsym.inc

+ 3 - 3
bugs/readme.txt

@@ -55,6 +55,7 @@ Fixed bugs:
   bug0039.pp    shows the else-else problem                         OK 0.9.9 (FK)
   bug0039.pp    shows the else-else problem                         OK 0.9.9 (FK)
   bug0040.pp    shows the if b1 xor b2 problem where b1,b2 :boolean OK 0.9.9 (FK)
   bug0040.pp    shows the if b1 xor b2 problem where b1,b2 :boolean OK 0.9.9 (FK)
   bug0041.pp    shows the if then end. problem                      OK 0.9.9 (FK)
   bug0041.pp    shows the if then end. problem                      OK 0.9.9 (FK)
+  bug0043.pp    shows assembler nasm output fpu opcodes problem     OK 0.99.6 (PFV)
   bug0044.pp    shows $ifdef and comment nesting/directive problem  OK 0.99.1 (PFV)
   bug0044.pp    shows $ifdef and comment nesting/directive problem  OK 0.99.1 (PFV)
   bug0045.pp    shows problem with virtual private methods          OK 0.9.9 (FK)
   bug0045.pp    shows problem with virtual private methods          OK 0.9.9 (FK)
                 (might not be a true bug but more of an incompatiblity?)
                 (might not be a true bug but more of an incompatiblity?)
@@ -157,6 +158,7 @@ Fixed bugs:
   bug0139.pp   Cannot access protected method of ancestor class from other unit. OK 0.99.6
   bug0139.pp   Cannot access protected method of ancestor class from other unit. OK 0.99.6
   bug0140.pp   Shows that interdependent units still are not OK.     OK 0.99.6 (PFV)
   bug0140.pp   Shows that interdependent units still are not OK.     OK 0.99.6 (PFV)
   bug0141.pp   Wrong Class sizes when using forwardly defined classes. OK 0.99.6
   bug0141.pp   Wrong Class sizes when using forwardly defined classes. OK 0.99.6
+  bug0146.pp   no sizeof() for var arrays and the size is pushed incorrect OK 0.99.7 (PFV)
   bug0147.pp   function b; is not allowed in implementation          OK 0.99.7 (PFV)
   bug0147.pp   function b; is not allowed in implementation          OK 0.99.7 (PFV)
 
 
 Unproducable bugs:
 Unproducable bugs:
@@ -177,8 +179,7 @@ bug0133.pp   object type declaration not 100% compatibile with TP7
 Unfixed bugs:
 Unfixed bugs:
 -------------
 -------------
 bug0042.pp   shows assembler double operator expression problem
 bug0042.pp   shows assembler double operator expression problem
-bug0043.pp   shows assembler nasm output with fpu opcodes problem
-bug0049.pp    shows an error while defining subrange types
+bug0049.pp   shows an error while defining subrange types
 bug0050.pp   can't set a function result in a nested procedure of a function
 bug0050.pp   can't set a function result in a nested procedure of a function
 bug0051.pp   shows a problem with putpixel
 bug0051.pp   shows a problem with putpixel
 bug0052.pp   collects missing graph unit routines
 bug0052.pp   collects missing graph unit routines
@@ -195,7 +196,6 @@ bug0142.pp   sizeof(object) is not tp7 compatible when no constructor is used
 bug0143.pp   cannot concat string and array of char in $X+ mode
 bug0143.pp   cannot concat string and array of char in $X+ mode
 bug0144.pp   problem with 'with object do'
 bug0144.pp   problem with 'with object do'
 bug0145.pp   typed files with huges records (needs filerec.size:longint)
 bug0145.pp   typed files with huges records (needs filerec.size:longint)
-bug0146.pp   no sizeof() for var arrays and the size is pushed incorrect
 bug0148.pp   crash when setting function result of a declared but not yet
 bug0148.pp   crash when setting function result of a declared but not yet
              implemented function in another function
              implemented function in another function
 bug0149.pp   (a, b) compile bug0149b twice and you'll get a crash
 bug0149.pp   (a, b) compile bug0149b twice and you'll get a crash

+ 6 - 2
compiler/aasm.pas

@@ -38,7 +38,7 @@ unit aasm;
 {$ifdef m68k}
 {$ifdef m68k}
        bestreal = real;
        bestreal = real;
 {$endif}
 {$endif}
-
+       pbestreal=^bestreal;
 
 
        tait = (
        tait = (
           ait_string,
           ait_string,
@@ -836,7 +836,11 @@ uses
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.14  1998-08-10 23:56:03  peter
+  Revision 1.15  1998-08-11 15:31:36  peter
+    * write extended to ppu file
+    * new version 0.99.7
+
+  Revision 1.14  1998/08/10 23:56:03  peter
     * fixed extended writing
     * fixed extended writing
 
 
   Revision 1.13  1998/08/10 14:49:33  peter
   Revision 1.13  1998/08/10 14:49:33  peter

+ 6 - 2
compiler/pdecl.pas

@@ -81,7 +81,7 @@ unit pdecl;
          def : pdef;
          def : pdef;
          sym : psym;
          sym : psym;
          ps : pconstset;
          ps : pconstset;
-         pd : pdouble;
+         pd : pbestreal;
          sp : pstring;
          sp : pstring;
 
 
       begin
       begin
@@ -1881,7 +1881,11 @@ unit pdecl;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.36  1998-08-10 14:50:09  peter
+  Revision 1.37  1998-08-11 15:31:38  peter
+    * write extended to ppu file
+    * new version 0.99.7
+
+  Revision 1.36  1998/08/10 14:50:09  peter
     + localswitches, moduleswitches, globalswitches splitting
     + localswitches, moduleswitches, globalswitches splitting
 
 
   Revision 1.35  1998/07/26 21:59:00  florian
   Revision 1.35  1998/07/26 21:59:00  florian

+ 6 - 2
compiler/pexpr.pas

@@ -1179,7 +1179,7 @@ unit pexpr;
                                       constchar:
                                       constchar:
                                         p1:=genordinalconstnode(pconstsym(srsym)^.value,cchardef);
                                         p1:=genordinalconstnode(pconstsym(srsym)^.value,cchardef);
                                       constreal:
                                       constreal:
-                                        p1:=genrealconstnode(pdouble(pconstsym(srsym)^.value)^);
+                                        p1:=genrealconstnode(pbestreal(pconstsym(srsym)^.value)^);
                                       constbool:
                                       constbool:
                                         p1:=genordinalconstnode(pconstsym(srsym)^.value,booldef);
                                         p1:=genordinalconstnode(pconstsym(srsym)^.value,booldef);
                                       constseta:
                                       constseta:
@@ -1786,7 +1786,11 @@ unit pexpr;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.32  1998-08-11 14:05:32  peter
+  Revision 1.33  1998-08-11 15:31:39  peter
+    * write extended to ppu file
+    * new version 0.99.7
+
+  Revision 1.32  1998/08/11 14:05:32  peter
     * fixed sizeof(array of char)
     * fixed sizeof(array of char)
 
 
   Revision 1.31  1998/08/10 14:50:11  peter
   Revision 1.31  1998/08/10 14:50:11  peter

+ 26 - 12
compiler/ppu.pas

@@ -97,6 +97,12 @@ const
   uf_smartlink      = $40;
   uf_smartlink      = $40;
   uf_finalize       = $80;
   uf_finalize       = $80;
 
 
+type
+{$ifdef m68k}
+  ppureal=single;
+{$else}
+  ppureal=extended;
+{$endif}
 
 
 type
 type
   tppuerror=(ppuentrytoobig,ppuentryerror);
   tppuerror=(ppuentrytoobig,ppuentryerror);
@@ -161,7 +167,7 @@ type
     function  getbyte:byte;
     function  getbyte:byte;
     function  getword:word;
     function  getword:word;
     function  getlongint:longint;
     function  getlongint:longint;
-    function  getdouble:double;
+    function  getreal:ppureal;
     function  getstring:string;
     function  getstring:string;
     function  skipuntilentry(untilb:byte):boolean;
     function  skipuntilentry(untilb:byte):boolean;
   {write}
   {write}
@@ -174,7 +180,7 @@ type
     procedure putbyte(b:byte);
     procedure putbyte(b:byte);
     procedure putword(w:word);
     procedure putword(w:word);
     procedure putlongint(l:longint);
     procedure putlongint(l:longint);
-    procedure putdouble(d:double);
+    procedure putreal(d:ppureal);
     procedure putstring(s:string);
     procedure putstring(s:string);
   end;
   end;
 
 
@@ -488,6 +494,7 @@ begin
   if entryidx+1>entry.size then
   if entryidx+1>entry.size then
    begin
    begin
      error:=true;
      error:=true;
+     getbyte:=0;
      exit;
      exit;
    end;
    end;
   readdata(b,1);
   readdata(b,1);
@@ -505,6 +512,7 @@ begin
   if entryidx+2>entry.size then
   if entryidx+2>entry.size then
    begin
    begin
      error:=true;
      error:=true;
+     getword:=0;
      exit;
      exit;
    end;
    end;
   readdata(w,2);
   readdata(w,2);
@@ -522,6 +530,7 @@ begin
   if entryidx+4>entry.size then
   if entryidx+4>entry.size then
    begin
    begin
      error:=true;
      error:=true;
+     getlongint:=0;
      exit;
      exit;
    end;
    end;
   readdata(l,4);
   readdata(l,4);
@@ -530,20 +539,21 @@ begin
 end;
 end;
 
 
 
 
-function tppufile.getdouble:double;
+function tppufile.getreal:ppureal;
 type
 type
-  pdouble = ^double;
+  pppureal = ^ppureal;
 var
 var
-  d : double;
+  d : ppureal;
 begin
 begin
-  if entryidx+sizeof(double)>entry.size then
+  if entryidx+sizeof(ppureal)>entry.size then
    begin
    begin
      error:=true;
      error:=true;
+     getreal:=0;
      exit;
      exit;
    end;
    end;
-  readdata(d,sizeof(double));
-  getdouble:=d;
-  inc(entryidx,sizeof(double));
+  readdata(d,sizeof(ppureal));
+  getreal:=d;
+  inc(entryidx,sizeof(ppureal));
 end;
 end;
 
 
 
 
@@ -735,9 +745,9 @@ begin
 end;
 end;
 
 
 
 
-procedure tppufile.putdouble(d:double);
+procedure tppufile.putreal(d:ppureal);
 begin
 begin
-  putdata(d,sizeof(double));
+  putdata(d,sizeof(ppureal));
 end;
 end;
 
 
 
 
@@ -750,7 +760,11 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  1998-06-25 10:51:01  pierre
+  Revision 1.8  1998-08-11 15:31:40  peter
+    * write extended to ppu file
+    * new version 0.99.7
+
+  Revision 1.7  1998/06/25 10:51:01  pierre
     * removed a remaining ifndef NEWPPU
     * removed a remaining ifndef NEWPPU
       replaced by ifdef OLDPPU
       replaced by ifdef OLDPPU
     * added uf_finalize to ppu unit
     * added uf_finalize to ppu unit

+ 9 - 8
compiler/symppu.inc

@@ -56,9 +56,9 @@
       end;
       end;
 
 
 
 
-    procedure writedouble(d:double);
+    procedure writereal(d:bestreal);
       begin
       begin
-        current_ppu^.putdata(d,sizeof(double));
+        current_ppu^.putreal(d);
       end;
       end;
 
 
 
 
@@ -248,14 +248,11 @@
       end;
       end;
 
 
 
 
-    function readdouble : double;
-      var
-         d : double;
+    function readreal : bestreal;
       begin
       begin
-        current_ppu^.getdata(d,sizeof(double));
+        readreal:=current_ppu^.getreal;
         if current_ppu^.error then
         if current_ppu^.error then
          Message(unit_f_ppu_read_error);
          Message(unit_f_ppu_read_error);
-        readdouble:=d;
       end;
       end;
 
 
 
 
@@ -697,7 +694,11 @@
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1998-08-10 14:50:29  peter
+  Revision 1.9  1998-08-11 15:31:41  peter
+    * write extended to ppu file
+    * new version 0.99.7
+
+  Revision 1.8  1998/08/10 14:50:29  peter
     + localswitches, moduleswitches, globalswitches splitting
     + localswitches, moduleswitches, globalswitches splitting
 
 
   Revision 1.7  1998/07/14 14:47:07  peter
   Revision 1.7  1998/07/14 14:47:07  peter

+ 9 - 5
compiler/symsym.inc

@@ -1337,7 +1337,7 @@
     constructor tconstsym.load;
     constructor tconstsym.load;
 
 
       var
       var
-         pd : pdouble;
+         pd : pbestreal;
          ps : pointer;  {***SETCONST}
          ps : pointer;  {***SETCONST}
 
 
       begin
       begin
@@ -1355,7 +1355,7 @@
             conststring : value:=longint(stringdup(readstring));
             conststring : value:=longint(stringdup(readstring));
             constreal : begin
             constreal : begin
                            new(pd);
                            new(pd);
-                           pd^:=readdouble;
+                           pd^:=readreal;
                            value:=longint(pd);
                            value:=longint(pd);
                         end;
                         end;
 {***SETCONST}
 {***SETCONST}
@@ -1405,7 +1405,7 @@
                           writelong(value);
                           writelong(value);
                        end;
                        end;
             conststring : writestring(pstring(value)^);
             conststring : writestring(pstring(value)^);
-            constreal : writedouble(pdouble(value)^);
+            constreal : writereal(pbestreal(value)^);
 {***SETCONST}
 {***SETCONST}
             constseta: writeset(pointer(value)^);
             constseta: writeset(pointer(value)^);
 {***}
 {***}
@@ -1430,7 +1430,7 @@
                           end;
                           end;
             constbool, constint, constord, constchar : st := 'i'+tostr(value);
             constbool, constint, constord, constchar : st := 'i'+tostr(value);
             constreal : begin
             constreal : begin
-                        system.str(pdouble(value)^,st);
+                        system.str(pbestreal(value)^,st);
                         st := 'r'+st;
                         st := 'r'+st;
                         end;
                         end;
          { if we don't know just put zero !! }
          { if we don't know just put zero !! }
@@ -1671,7 +1671,11 @@
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.28  1998-08-11 14:07:27  peter
+  Revision 1.29  1998-08-11 15:31:42  peter
+    * write extended to ppu file
+    * new version 0.99.7
+
+  Revision 1.28  1998/08/11 14:07:27  peter
     * fixed pushing of high value for openarray
     * fixed pushing of high value for openarray
 
 
   Revision 1.27  1998/08/10 14:50:31  peter
   Revision 1.27  1998/08/10 14:50:31  peter