Browse Source

* fix for internalerror(12) on ord(booleanarray[1])

pierre 26 years ago
parent
commit
e3ad9cae78
1 changed files with 26 additions and 23 deletions
  1. 26 23
      compiler/cg386cnv.pas

+ 26 - 23
compiler/cg386cnv.pas

@@ -228,9 +228,9 @@ implementation
 *****************************************************************************}
 *****************************************************************************}
 
 
     type
     type
-      tsecondconvproc = procedure(pto,pfrom : ptree;convtyp : tconverttype);
+      tsecondconvproc = procedure(var pto,pfrom : ptree;convtyp : tconverttype);
 
 
-    procedure second_int_to_int(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_int_to_int(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         op      : tasmop;
         op      : tasmop;
         opsize    : topsize;
         opsize    : topsize;
@@ -342,7 +342,7 @@ implementation
           end;
           end;
       end;
       end;
 
 
-    procedure second_string_to_string(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_string_to_string(var pto,pfrom : ptree;convtyp : tconverttype);
 
 
       var
       var
          pushed : tpushed;
          pushed : tpushed;
@@ -456,7 +456,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_cstring_to_pchar(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_cstring_to_pchar(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         hr : preference;
         hr : preference;
       begin
       begin
@@ -498,7 +498,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_string_to_chararray(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_string_to_chararray(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
          l1 : pasmlabel;
          l1 : pasmlabel;
          hr : preference;
          hr : preference;
@@ -547,7 +547,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_array_to_pointer(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_array_to_pointer(var pto,pfrom : ptree;convtyp : tconverttype);
       begin
       begin
          del_reference(pfrom^.location.reference);
          del_reference(pfrom^.location.reference);
          clear_location(pto^.location);
          clear_location(pto^.location);
@@ -558,7 +558,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_pointer_to_array(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_pointer_to_array(var pto,pfrom : ptree;convtyp : tconverttype);
       begin
       begin
         clear_location(pto^.location);
         clear_location(pto^.location);
         pto^.location.loc:=LOC_REFERENCE;
         pto^.location.loc:=LOC_REFERENCE;
@@ -584,7 +584,7 @@ implementation
 
 
     { generates the code for the type conversion from an array of char }
     { generates the code for the type conversion from an array of char }
     { to a string                                                       }
     { to a string                                                       }
-    procedure second_chararray_to_string(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_chararray_to_string(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
          pushed : tpushed;
          pushed : tpushed;
          l : longint;
          l : longint;
@@ -643,7 +643,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_char_to_string(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_char_to_string(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         pushed : tpushed;
         pushed : tpushed;
       begin
       begin
@@ -680,7 +680,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_int_to_real(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_int_to_real(var pto,pfrom : ptree;convtyp : tconverttype);
 
 
       var
       var
          r : preference;
          r : preference;
@@ -789,7 +789,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_real_to_fix(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_real_to_fix(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
          rreg : tregister;
          rreg : tregister;
          ref : treference;
          ref : treference;
@@ -828,7 +828,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_real_to_real(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_real_to_real(var pto,pfrom : ptree;convtyp : tconverttype);
       begin
       begin
          case pfrom^.location.loc of
          case pfrom^.location.loc of
             LOC_FPU : ;
             LOC_FPU : ;
@@ -851,7 +851,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_fix_to_real(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_fix_to_real(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         popeax,popebx,popecx,popedx : boolean;
         popeax,popebx,popecx,popedx : boolean;
         startreg : tregister;
         startreg : tregister;
@@ -929,7 +929,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_cord_to_pointer(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_cord_to_pointer(var pto,pfrom : ptree;convtyp : tconverttype);
       begin
       begin
         { this can't happend, because constants are already processed in
         { this can't happend, because constants are already processed in
           pass 1 }
           pass 1 }
@@ -937,7 +937,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_int_to_fix(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_int_to_fix(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
          hregister : tregister;
          hregister : tregister;
       begin
       begin
@@ -971,7 +971,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_proc_to_procvar(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_proc_to_procvar(var pto,pfrom : ptree;convtyp : tconverttype);
       begin
       begin
         { method pointer ? }
         { method pointer ? }
         if assigned(pfrom^.left) then
         if assigned(pfrom^.left) then
@@ -990,7 +990,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_bool_to_int(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_bool_to_int(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
          oldtruelabel,oldfalselabel,hlabel : pasmlabel;
          oldtruelabel,oldfalselabel,hlabel : pasmlabel;
          hregister : tregister;
          hregister : tregister;
@@ -1113,7 +1113,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_int_to_bool(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_int_to_bool(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         hregister : tregister;
         hregister : tregister;
         flags     : tresflags;
         flags     : tresflags;
@@ -1166,7 +1166,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_load_smallset(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_load_smallset(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         href : treference;
         href : treference;
         pushedregs : tpushed;
         pushedregs : tpushed;
@@ -1185,7 +1185,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_ansistring_to_pchar(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_ansistring_to_pchar(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
          l1 : pasmlabel;
          l1 : pasmlabel;
          hr : preference;
          hr : preference;
@@ -1214,7 +1214,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_pchar_to_string(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_pchar_to_string(var pto,pfrom : ptree;convtyp : tconverttype);
       var
       var
         pushed : tpushed;
         pushed : tpushed;
       begin
       begin
@@ -1287,7 +1287,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure second_nothing(pto,pfrom : ptree;convtyp : tconverttype);
+    procedure second_nothing(var pto,pfrom : ptree;convtyp : tconverttype);
       begin
       begin
       end;
       end;
 
 
@@ -1491,7 +1491,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.93  1999-11-06 14:34:17  peter
+  Revision 1.94  1999-11-29 22:15:25  pierre
+   * fix for internalerror(12) on ord(booleanarray[1])
+
+  Revision 1.93  1999/11/06 14:34:17  peter
     * truncated log to 20 revs
     * truncated log to 20 revs
 
 
   Revision 1.92  1999/10/25 10:32:43  peter
   Revision 1.92  1999/10/25 10:32:43  peter