Răsfoiți Sursa

* disable FIXED data type per default

florian 25 ani în urmă
părinte
comite
b2efa0f338
3 a modificat fișierele cu 31 adăugiri și 4 ștergeri
  1. 9 0
      compiler/README
  2. 9 2
      compiler/options.pas
  3. 13 2
      compiler/psystem.pas

+ 9 - 0
compiler/README

@@ -72,4 +72,13 @@ Changes in the syntax or semantic of FPC:
   14/11/99   makefile.fpc is not available anymore. You must now use fpcmake
   14/11/99   makefile.fpc is not available anymore. You must now use fpcmake
              which is available from the utils/. There is also an example
              which is available from the utils/. There is also an example
              Makefile.fpc
              Makefile.fpc
+  15/02/00   The support of the fixed data type has been removed from the
+             compiler because
+                1. it is buggy
+                2. it is very seldom used
+                3. the single data type is faster on modern cpus (Pentium+)
 
 
+             If still want to use it, you have to recompile the compiler
+             with -dSUPPORT_FIXED and recompile the rtl with that compiler.
+             To find out if the used compiler supports the fixed data
+             type, check the directive HASFIXED  (FK)

+ 9 - 2
compiler/options.pas

@@ -1205,6 +1205,10 @@ begin
   def_symbol('INCLUDEOK');
   def_symbol('INCLUDEOK');
   def_symbol('NEWMM');
   def_symbol('NEWMM');
   def_symbol('HASWIDECHAR');
   def_symbol('HASWIDECHAR');
+
+{$ifdef SUPPORT_FIXED}
+  def_symbol('HASFIXED');
+{$endif SUPPORT_FIXED}
 {$ifdef cardinalmulfix}
 {$ifdef cardinalmulfix}
 { for the compiler }
 { for the compiler }
   def_symbol('CARDINALMULFIX');
   def_symbol('CARDINALMULFIX');
@@ -1431,7 +1435,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.60  2000-02-10 11:45:48  peter
+  Revision 1.61  2000-02-15 14:36:45  florian
+    * disable FIXED data type per default
+
+  Revision 1.60  2000/02/10 11:45:48  peter
     * addpath fixed with list of paths when inserting at the beginning
     * addpath fixed with list of paths when inserting at the beginning
     * if exepath=currentdir then it's not inserted in path list
     * if exepath=currentdir then it's not inserted in path list
     * searchpaths in ppc386.cfg are now added at the beginning of the
     * searchpaths in ppc386.cfg are now added at the beginning of the
@@ -1514,4 +1521,4 @@ end.
     * win32/go32v2 write short pathnames to link.res so c:\Program Files\ is
     * win32/go32v2 write short pathnames to link.res so c:\Program Files\ is
       finally supported as installdir.
       finally supported as installdir.
 
 
-}
+}

+ 13 - 2
compiler/psystem.pas

@@ -103,7 +103,9 @@ begin
   p^.insert(new(ptypesym,initdef('s32real',s32floatdef)));
   p^.insert(new(ptypesym,initdef('s32real',s32floatdef)));
   p^.insert(new(ptypesym,initdef('s64real',s64floatdef)));
   p^.insert(new(ptypesym,initdef('s64real',s64floatdef)));
   p^.insert(new(ptypesym,initdef('s80real',s80floatdef)));
   p^.insert(new(ptypesym,initdef('s80real',s80floatdef)));
+{$ifdef SUPPORT_FIXED}
   p^.insert(new(ptypesym,initdef('s32fixed',s32fixeddef)));
   p^.insert(new(ptypesym,initdef('s32fixed',s32fixeddef)));
+{$endif SUPPORT_FIXED}
   { Add a type for virtual method tables in lowercase }
   { Add a type for virtual method tables in lowercase }
   { so it isn't reachable!                            }
   { so it isn't reachable!                            }
   vmtsymtable:=new(psymtable,init(recordsymtable));
   vmtsymtable:=new(psymtable,init(recordsymtable));
@@ -143,8 +145,10 @@ begin
   p^.insert(new(ptypesym,initdef('WIDECHAR',cwidechardef)));
   p^.insert(new(ptypesym,initdef('WIDECHAR',cwidechardef)));
   p^.insert(new(ptypesym,initdef('TEXT',new(pfiledef,inittext))));
   p^.insert(new(ptypesym,initdef('TEXT',new(pfiledef,inittext))));
   p^.insert(new(ptypesym,initdef('CARDINAL',u32bitdef)));
   p^.insert(new(ptypesym,initdef('CARDINAL',u32bitdef)));
+{$ifdef SUPPORT_FIXED}
   p^.insert(new(ptypesym,initdef('FIXED',new(pfloatdef,init(f32bit)))));
   p^.insert(new(ptypesym,initdef('FIXED',new(pfloatdef,init(f32bit)))));
   p^.insert(new(ptypesym,initdef('FIXED16',new(pfloatdef,init(f16bit)))));
   p^.insert(new(ptypesym,initdef('FIXED16',new(pfloatdef,init(f16bit)))));
+{$endif SUPPORT_FIXED}
   p^.insert(new(ptypesym,initdef('QWORD',cu64bitdef)));
   p^.insert(new(ptypesym,initdef('QWORD',cu64bitdef)));
   p^.insert(new(ptypesym,initdef('INT64',cs64bitdef)));
   p^.insert(new(ptypesym,initdef('INT64',cs64bitdef)));
   p^.insert(new(ptypesym,initdef('TYPEDFILE',new(pfiledef,inittypeddef(voiddef)))));
   p^.insert(new(ptypesym,initdef('TYPEDFILE',new(pfiledef,inittypeddef(voiddef)))));
@@ -175,7 +179,9 @@ begin
   s32floatdef:=pfloatdef(globaldef('s32real'));
   s32floatdef:=pfloatdef(globaldef('s32real'));
   s64floatdef:=pfloatdef(globaldef('s64real'));
   s64floatdef:=pfloatdef(globaldef('s64real'));
   s80floatdef:=pfloatdef(globaldef('s80real'));
   s80floatdef:=pfloatdef(globaldef('s80real'));
+{$ifdef SUPPORT_FIXED}
   s32fixeddef:=pfloatdef(globaldef('s32fixed'));
   s32fixeddef:=pfloatdef(globaldef('s32fixed'));
+{$endif SUPPORT_FIXED}
   booldef:=porddef(globaldef('boolean'));
   booldef:=porddef(globaldef('boolean'));
   voidpointerdef:=ppointerdef(globaldef('void_pointer'));
   voidpointerdef:=ppointerdef(globaldef('void_pointer'));
   charpointerdef:=ppointerdef(globaldef('char_pointer'));
   charpointerdef:=ppointerdef(globaldef('char_pointer'));
@@ -228,7 +234,9 @@ begin
   else
   else
    s80floatdef:=new(pfloatdef,init(s80real));
    s80floatdef:=new(pfloatdef,init(s80real));
 {$endif}
 {$endif}
+{$ifdef SUPPORT_FIXED}
   s32fixeddef:=new(pfloatdef,init(f32bit));
   s32fixeddef:=new(pfloatdef,init(f32bit));
+{$endif SUPPORT_FIXED}
   { some other definitions }
   { some other definitions }
   voidpointerdef:=new(ppointerdef,initdef(voiddef));
   voidpointerdef:=new(ppointerdef,initdef(voiddef));
   charpointerdef:=new(ppointerdef,initdef(cchardef));
   charpointerdef:=new(ppointerdef,initdef(cchardef));
@@ -241,7 +249,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.33  2000-02-09 13:23:00  peter
+  Revision 1.34  2000-02-15 14:36:45  florian
+    * disable FIXED data type per default
+
+  Revision 1.33  2000/02/09 13:23:00  peter
     * log truncated
     * log truncated
 
 
   Revision 1.32  2000/01/07 01:14:33  peter
   Revision 1.32  2000/01/07 01:14:33  peter
@@ -269,4 +280,4 @@ end.
     * moved bitmask constants to sets
     * moved bitmask constants to sets
     * some other type/const renamings
     * some other type/const renamings
 
 
-}
+}