Browse Source

* heap and heapsize removed
* checkpointer fixes

peter 21 years ago
parent
commit
e7459f5466

+ 5 - 7
compiler/globals.pas

@@ -50,10 +50,6 @@ interface
       globtype,version,systems,cpuinfo;
       globtype,version,systems,cpuinfo;
 
 
     const
     const
-{$ifdef Splitheap}
-       testsplit : boolean = false;
-{$endif Splitheap}
-
        delphimodeswitches : tmodeswitches=
        delphimodeswitches : tmodeswitches=
          [m_delphi,m_all,m_class,m_objpas,m_result,m_string_pchar,
          [m_delphi,m_all,m_class,m_objpas,m_result,m_string_pchar,
           m_pointer_2_procedure,m_autoderef,m_tp_procvar,m_initfinal,m_default_ansistring,
           m_pointer_2_procedure,m_autoderef,m_tp_procvar,m_initfinal,m_default_ansistring,
@@ -235,7 +231,6 @@ interface
        aktsourcecodepage : tcodepagestring;
        aktsourcecodepage : tcodepagestring;
 
 
      { Memory sizes }
      { Memory sizes }
-       heapsize,
        stacksize    : longint;
        stacksize    : longint;
 
 
 {$Ifdef EXTDEBUG}
 {$Ifdef EXTDEBUG}
@@ -2126,7 +2121,6 @@ implementation
       { memory sizes, will be overriden by parameter or default for target
       { memory sizes, will be overriden by parameter or default for target
         in options or init_parser }
         in options or init_parser }
         stacksize:=0;
         stacksize:=0;
-        heapsize:=0;
 
 
         apptype:=app_cui;
         apptype:=app_cui;
      end;
      end;
@@ -2134,7 +2128,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.147  2004-10-16 22:46:14  olle
+  Revision 1.148  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.147  2004/10/16 22:46:14  olle
    * Fixed printing of filedates
    * Fixed printing of filedates
 
 
   Revision 1.146  2004/10/16 13:03:13  olle
   Revision 1.146  2004/10/16 13:03:13  olle

+ 7 - 2
compiler/globtype.pas

@@ -79,6 +79,7 @@ than 255 characters. That's why using Ansi Strings}
          { codegen }
          { codegen }
          cs_check_overflow,cs_check_range,cs_check_object,
          cs_check_overflow,cs_check_range,cs_check_object,
          cs_check_io,cs_check_stack,
          cs_check_io,cs_check_stack,
+         cs_checkpointer,
          cs_omitstackframe,cs_do_assertion,cs_generate_rtti,
          cs_omitstackframe,cs_do_assertion,cs_generate_rtti,
          cs_full_boolean_eval,cs_typed_const_writable,
          cs_full_boolean_eval,cs_typed_const_writable,
          { mmx }
          { mmx }
@@ -120,7 +121,7 @@ than 255 characters. That's why using Ansi Strings}
          cs_browser_log,
          cs_browser_log,
          { debugger }
          { debugger }
          cs_gdb_dbx,cs_gdb_gsym,cs_gdb_heaptrc,cs_gdb_lineinfo,
          cs_gdb_dbx,cs_gdb_gsym,cs_gdb_heaptrc,cs_gdb_lineinfo,
-         cs_checkpointer,cs_gdb_valgrind,cs_gdb_dwarf,
+         cs_gdb_valgrind,cs_gdb_dwarf,
          { assembling }
          { assembling }
          cs_asm_leave,cs_asm_extern,cs_asm_pipe,cs_asm_source,
          cs_asm_leave,cs_asm_extern,cs_asm_pipe,cs_asm_source,
          cs_asm_regalloc,cs_asm_tempalloc,cs_asm_nodes,
          cs_asm_regalloc,cs_asm_tempalloc,cs_asm_nodes,
@@ -306,7 +307,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.62  2004-10-15 09:14:16  mazen
+  Revision 1.63  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.62  2004/10/15 09:14:16  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 11 - 6
compiler/ncal.pas

@@ -1039,8 +1039,9 @@ type
                   if (po_abstractmethod in hp.procoptions) then
                   if (po_abstractmethod in hp.procoptions) then
                      AbstractMethodsList.Insert(hp.procsym.realname)
                      AbstractMethodsList.Insert(hp.procsym.realname)
                   else
                   else
-                    { If this symbol is an overriding method, then remove it from the list }
-                    if po_overridingmethod in hp.procoptions then
+                    { If this symbol is a virtual (includes override) method,
+                      then remove it from the list }
+                    if po_virtualmethod in hp.procoptions then
                       AbstractMethodsList.Remove(hp.procsym.realname);
                       AbstractMethodsList.Remove(hp.procsym.realname);
                end;
                end;
            end;
            end;
@@ -1405,7 +1406,6 @@ type
         i : longint;
         i : longint;
         method_must_be_valid,
         method_must_be_valid,
         is_const : boolean;
         is_const : boolean;
-        hp : tnode;
       label
       label
         errorexit;
         errorexit;
       begin
       begin
@@ -2070,7 +2070,7 @@ type
         errorexit;
         errorexit;
       begin
       begin
          result:=nil;
          result:=nil;
-{!!!!!!!!
+(*
          if (procdefinition.proccalloption=pocall_inline) and
          if (procdefinition.proccalloption=pocall_inline) and
             { can we inline this procedure at the node level? }
             { can we inline this procedure at the node level? }
             (tprocdef(procdefinition).inlininginfo^.inlinenode) then
             (tprocdef(procdefinition).inlininginfo^.inlinenode) then
@@ -2117,7 +2117,8 @@ type
                   exit;
                   exit;
                 end;
                 end;
            end;
            end;
-}
+*)
+
          { calculate the parameter info for the procdef }
          { calculate the parameter info for the procdef }
          if not procdefinition.has_paraloc_info then
          if not procdefinition.has_paraloc_info then
            begin
            begin
@@ -2415,7 +2416,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.252  2004-10-15 09:14:16  mazen
+  Revision 1.253  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.252  2004/10/15 09:14:16  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 12 - 8
compiler/ncgmem.pas

@@ -267,9 +267,12 @@ implementation
               end;
               end;
          end;
          end;
          if (cs_gdb_heaptrc in aktglobalswitches) and
          if (cs_gdb_heaptrc in aktglobalswitches) and
-            (cs_checkpointer in aktglobalswitches) and
+           (cs_checkpointer in aktlocalswitches) and
             not(cs_compilesystem in aktmoduleswitches) and
             not(cs_compilesystem in aktmoduleswitches) and
-            (not tpointerdef(left.resulttype.def).is_far) then
+            not(
+                tpointerdef(left.resulttype.def).is_far or
+                is_dynamic_array(left.resulttype.def)
+               ) then
           begin
           begin
             paraloc1.init;
             paraloc1.init;
             paramanager.getintparaloc(pocall_default,1,paraloc1);
             paramanager.getintparaloc(pocall_default,1,paraloc1);
@@ -324,7 +327,7 @@ implementation
              end;
              end;
              { implicit deferencing }
              { implicit deferencing }
              if (cs_gdb_heaptrc in aktglobalswitches) and
              if (cs_gdb_heaptrc in aktglobalswitches) and
-                (cs_checkpointer in aktglobalswitches) and
+                (cs_checkpointer in aktlocalswitches) and
                 not(cs_compilesystem in aktmoduleswitches) then
                 not(cs_compilesystem in aktmoduleswitches) then
               begin
               begin
                 paramanager.getintparaloc(pocall_default,1,paraloc1);
                 paramanager.getintparaloc(pocall_default,1,paraloc1);
@@ -342,7 +345,7 @@ implementation
              cg.a_load_loc_ref(exprasmlist,OS_ADDR,left.location,location.reference);
              cg.a_load_loc_ref(exprasmlist,OS_ADDR,left.location,location.reference);
              { implicit deferencing also for interfaces }
              { implicit deferencing also for interfaces }
              if (cs_gdb_heaptrc in aktglobalswitches) and
              if (cs_gdb_heaptrc in aktglobalswitches) and
-                (cs_checkpointer in aktglobalswitches) and
+                (cs_checkpointer in aktlocalswitches) and
                 not(cs_compilesystem in aktmoduleswitches) then
                 not(cs_compilesystem in aktmoduleswitches) then
               begin
               begin
                 paramanager.getintparaloc(pocall_default,1,paraloc1);
                 paramanager.getintparaloc(pocall_default,1,paraloc1);
@@ -494,7 +497,6 @@ implementation
 
 
      procedure tcgvecnode.rangecheck_array;
      procedure tcgvecnode.rangecheck_array;
        var
        var
-         freereg : boolean;
          hightree : tnode;
          hightree : tnode;
          poslabel,
          poslabel,
          neglabel : tasmlabel;
          neglabel : tasmlabel;
@@ -517,13 +519,11 @@ implementation
                firstpass(hightree);
                firstpass(hightree);
                secondpass(hightree);
                secondpass(hightree);
                { generate compares }
                { generate compares }
-               freereg:=false;
                if (right.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
                if (right.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
                  hreg:=cg.makeregsize(exprasmlist,right.location.register,OS_INT)
                  hreg:=cg.makeregsize(exprasmlist,right.location.register,OS_INT)
                else
                else
                  begin
                  begin
                    hreg:=cg.getintregister(exprasmlist,OS_INT);
                    hreg:=cg.getintregister(exprasmlist,OS_INT);
-                   freereg:=true;
                    cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,hreg);
                    cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,hreg);
                  end;
                  end;
                objectlibrary.getlabel(neglabel);
                objectlibrary.getlabel(neglabel);
@@ -879,7 +879,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.97  2004-09-25 14:23:54  peter
+  Revision 1.98  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.97  2004/09/25 14:23:54  peter
     * ungetregister is now only used for cpuregisters, renamed to
     * ungetregister is now only used for cpuregisters, renamed to
       ungetcpuregister
       ungetcpuregister
     * renamed (get|unget)explicitregister(s) to ..cpuregister
     * renamed (get|unget)explicitregister(s) to ..cpuregister

+ 27 - 29
compiler/options.pas

@@ -247,17 +247,23 @@ begin
 {$ifdef i386}
 {$ifdef i386}
       '3',
       '3',
 {$endif}
 {$endif}
+{$ifdef x86_64}
+      '4',
+{$endif}
+{$ifdef m68k}
+      '6',
+{$endif}
+{$ifdef arm}
+      'S',
+{$endif}
 {$ifdef powerpc}
 {$ifdef powerpc}
       'P',
       'P',
 {$endif}
 {$endif}
-{$ifdef vis}
-      'V',
-{$endif}
 {$ifdef sparc}
 {$ifdef sparc}
       'S',
       'S',
 {$endif}
 {$endif}
-{$ifdef m68k}
-      '6',
+{$ifdef vis}
+      'V',
 {$endif}
 {$endif}
       '*' : show:=true;
       '*' : show:=true;
      end;
      end;
@@ -506,16 +512,6 @@ begin
                      end;
                      end;
                     'g' :
                     'g' :
                       include(initmoduleswitches,cs_create_pic);
                       include(initmoduleswitches,cs_create_pic);
-                    'h' :
-                       begin
-                         val(copy(more,j+1,length(more)-j),heapsize,code);
-                         if (code<>0) or
-{$WARNING Is the upper limit for heapsize needed / useful?}
-{                                      (heapsize>=67107840) or   }
-                                                           (heapsize<1024) then
-                          IllegalPara(opt);
-                         break;
-                       end;
                     'i' :
                     'i' :
                       If UnsetBool(More, j) then
                       If UnsetBool(More, j) then
                         exclude(initlocalswitches,cs_check_io)
                         exclude(initlocalswitches,cs_check_io)
@@ -725,7 +721,7 @@ begin
                   exclude(initglobalswitches,cs_gdb_gsym);
                   exclude(initglobalswitches,cs_gdb_gsym);
                   exclude(initglobalswitches,cs_gdb_heaptrc);
                   exclude(initglobalswitches,cs_gdb_heaptrc);
                   exclude(initglobalswitches,cs_gdb_lineinfo);
                   exclude(initglobalswitches,cs_gdb_lineinfo);
-                  exclude(initglobalswitches,cs_checkpointer);
+                  exclude(initlocalswitches,cs_checkpointer);
                 end
                 end
                else
                else
                 begin
                 begin
@@ -774,9 +770,9 @@ begin
                      'c' :
                      'c' :
                        begin
                        begin
                          if UnsetBool(More, j) then
                          if UnsetBool(More, j) then
-                           exclude(initglobalswitches,cs_checkpointer)
-                        else
-                            include(initglobalswitches,cs_checkpointer);
+                           exclude(initlocalswitches,cs_checkpointer)
+                         else
+                           include(initlocalswitches,cs_checkpointer);
                        end;
                        end;
                      'v' :
                      'v' :
                        begin
                        begin
@@ -836,6 +832,13 @@ begin
            'm' :
            'm' :
              parapreprocess:=not UnSetBool(more,0);
              parapreprocess:=not UnSetBool(more,0);
 
 
+           'M' :
+             begin
+               more:=Upper(more);
+               if not SetCompileMode(more, true) then
+                 IllegalPara(opt);
+             end;
+
            'n' :
            'n' :
              begin
              begin
                if More='' then
                if More='' then
@@ -886,9 +889,7 @@ begin
                  end;
                  end;
              end;
              end;
 
 
-{$ifdef Unix}
            'P' : ; { Ignore used by fpc.pp }
            'P' : ; { Ignore used by fpc.pp }
-{$endif Unix}
 
 
            's' :
            's' :
              begin
              begin
@@ -912,13 +913,6 @@ begin
                  end;
                  end;
              end;
              end;
 
 
-           'M' :
-             begin
-               more:=Upper(more);
-               if not SetCompileMode(more, true) then
-                 IllegalPara(opt);
-             end;
-
            'S' :
            'S' :
              begin
              begin
                if more[1]='I' then
                if more[1]='I' then
@@ -2113,7 +2107,11 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.148  2004-10-24 20:01:08  peter
+  Revision 1.149  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.148  2004/10/24 20:01:08  peter
     * remove saveregister calling convention
     * remove saveregister calling convention
 
 
   Revision 1.147  2004/10/15 09:14:17  mazen
   Revision 1.147  2004/10/15 09:14:17  mazen

+ 9 - 18
compiler/parser.pas

@@ -98,10 +98,8 @@ implementation
          registertais;
          registertais;
 
 
          { memory sizes }
          { memory sizes }
-         if heapsize=0 then
-          heapsize:=target_info.heapsize;
          if stacksize=0 then
          if stacksize=0 then
-          stacksize:=target_info.stacksize;
+           stacksize:=target_info.stacksize;
 
 
          { open assembler response }
          { open assembler response }
          if cs_link_on_target in aktglobalswitches then
          if cs_link_on_target in aktglobalswitches then
@@ -123,8 +121,8 @@ implementation
          case target_info.system of
          case target_info.system of
            system_powerpc_morphos:
            system_powerpc_morphos:
              include(supported_calling_conventions,pocall_syscall);
              include(supported_calling_conventions,pocall_syscall);
-	   system_m68k_amiga:
-	     include(supported_calling_conventions,pocall_syscall);
+           system_m68k_amiga:
+             include(supported_calling_conventions,pocall_syscall);
          end;
          end;
       end;
       end;
 
 
@@ -542,18 +540,7 @@ implementation
           end;
           end;
 {$endif USEEXCEPT}
 {$endif USEEXCEPT}
 
 
-       { clear memory }
-{$ifdef Splitheap}
-         if testsplit then
-           begin
-           { temp heap should be empty after that !!!}
-             codegen_donemodule;
-             Releasetempheap;
-           end;
-{$endif Splitheap}
-
-         { restore old state, close trees, > 0.99.5 has heapblocks, so
-           it's the default to release the trees }
+         { restore old state }
          done_module;
          done_module;
 
 
          if assigned(current_module) then
          if assigned(current_module) then
@@ -711,7 +698,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.67  2004-10-15 09:14:17  mazen
+  Revision 1.68  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.67  2004/10/15 09:14:17  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 7 - 3
compiler/pexpr.pas

@@ -316,13 +316,13 @@ implementation
              addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(temp),caddrnode.create(p1)));
              addstatement(newstatement,cassignmentnode.create(ctemprefnode.create(temp),caddrnode.create(p1)));
              addstatement(newstatement,cassignmentnode.create(
              addstatement(newstatement,cassignmentnode.create(
                  cderefnode.create(ctemprefnode.create(temp)),
                  cderefnode.create(ctemprefnode.create(temp)),
-                 caddnode.create(addn,
+                 caddnode.create(ntyp,
                      cderefnode.create(ctemprefnode.create(temp)),
                      cderefnode.create(ctemprefnode.create(temp)),
                      p2)));
                      p2)));
              addstatement(newstatement,ctempdeletenode.create(temp));
              addstatement(newstatement,ctempdeletenode.create(temp));
            end
            end
          else
          else
-           result:=cassignmentnode.create(p1,caddnode.create(addn,p1.getcopy,p2));
+           result:=cassignmentnode.create(p1,caddnode.create(ntyp,p1.getcopy,p2));
        end;
        end;
 
 
 
 
@@ -2478,7 +2478,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.166  2004-10-15 09:14:17  mazen
+  Revision 1.167  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.166  2004/10/15 09:14:17  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 6 - 60
compiler/pmodules.pas

@@ -352,52 +352,6 @@ implementation
       end;
       end;
 
 
 
 
-    procedure insertheap;
-      begin
-        maybe_new_object_file(bssSegment);
-        maybe_new_object_file(dataSegment);
-        { On the Macintosh Classic M68k Architecture
-          The Heap variable is simply a POINTER to the
-          real HEAP. The HEAP must be set up by the RTL
-          and must store the pointer in this value.
-          On OS/2 the heap is also intialized by the RTL. We do
-          not output a pointer }
-         case target_info.system of
-            system_i386_OS2:
-                bssSegment.concat(Tai_datablock.Create_global('HEAP',4));
-            system_i386_EMX:
-              ;
-            system_powerpc_macos:
-              ;
-            system_i386_watcom:
-              ;
-            system_alpha_linux:
-              ;
-            system_m68k_Mac:
-              bssSegment.concat(Tai_datablock.Create_global('HEAP',4));
-            system_m68k_PalmOS:
-              ;
-         else
-            begin
-              bssSegment.concat(Tai_align.Create(var_align(heapsize)));
-              bssSegment.concat(Tai_datablock.Create_global('HEAP',heapsize));
-            end;
-         end;
-{$ifdef m68k}
-         if target_info.system<>system_m68k_PalmOS then
-           begin
-              dataSegment.concat(Tai_align.Create(const_align(4)));
-              dataSegment.concat(Tai_symbol.Createname_global('HEAPSIZE',AT_DATA,4));
-              dataSegment.concat(Tai_const.Create_32bit(heapsize));
-           end;
-{$else m68k}
-         dataSegment.concat(Tai_align.Create(const_align(4)));
-         dataSegment.concat(Tai_symbol.Createname_global('HEAPSIZE',AT_DATA,4));
-         dataSegment.concat(Tai_const.Create_32bit(heapsize));
-{$endif m68k}
-      end;
-
-
     procedure insertstacklength;
     procedure insertstacklength;
       begin
       begin
         { stacksize can be specified and is now simulated }
         { stacksize can be specified and is now simulated }
@@ -1111,17 +1065,6 @@ implementation
 {$endif DEBUG}
 {$endif DEBUG}
          constsymtable:=symtablestack;
          constsymtable:=symtablestack;
 
 
-{$ifdef Splitheap}
-         if testsplit then
-           begin
-              Split_Heap;
-              allow_special:=true;
-              Switch_to_temp_heap;
-           end;
-         { it will report all crossings }
-         allow_special:=false;
-{$endif Splitheap}
-
          if has_impl then
          if has_impl then
            begin
            begin
              Message1(parser_u_parsing_implementation,current_module.modulename^);
              Message1(parser_u_parsing_implementation,current_module.modulename^);
@@ -1496,11 +1439,10 @@ implementation
             (target_info.system=system_i386_NETWARE) then
             (target_info.system=system_i386_NETWARE) then
            exportlib.generatelib;
            exportlib.generatelib;
 
 
-         { insert Tables and Heap }
+         { insert Tables and StackLength }
          insertThreadVarTablesTable;
          insertThreadVarTablesTable;
          insertResourceTablesTable;
          insertResourceTablesTable;
          insertinitfinaltable;
          insertinitfinaltable;
-         insertheap;
          insertstacklength;
          insertstacklength;
 
 
          { create dwarf debuginfo }
          { create dwarf debuginfo }
@@ -1564,7 +1506,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.166  2004-10-15 09:14:17  mazen
+  Revision 1.167  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.166  2004/10/15 09:14:17  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 39 - 20
compiler/scandir.pas

@@ -103,6 +103,31 @@ implementation
          end;
          end;
       end;
       end;
 
 
+    procedure do_localswitchdefault(sw:tlocalswitch);
+      var
+        state : char;
+      begin
+        state:=current_scanner.readstatedefault;
+        if (sw<>cs_localnone) and (state in ['-','+','*']) then
+         begin
+           if not localswitcheschanged then
+             nextaktlocalswitches:=aktlocalswitches;
+           if state='-' then
+            exclude(nextaktlocalswitches,sw)
+           else
+            if state='+' then
+             include(nextaktlocalswitches,sw)
+            else
+             begin
+              if sw in initlocalswitches then
+               include(nextaktlocalswitches,sw)
+              else
+               exclude(nextaktlocalswitches,sw);
+             end;
+           localswitcheschanged:=true;
+         end;
+      end;
+
 
 
     procedure do_message(w:integer);
     procedure do_message(w:integer);
       begin
       begin
@@ -231,6 +256,12 @@ implementation
       end;
       end;
 
 
 
 
+    procedure dir_checkpointer;
+      begin
+        do_localswitchdefault(cs_checkpointer);
+      end;
+
+
     procedure dir_objectchecks;
     procedure dir_objectchecks;
       begin
       begin
         do_localswitch(cs_check_object);
         do_localswitch(cs_check_object);
@@ -517,24 +548,7 @@ implementation
         current_scanner.skipspace;
         current_scanner.skipspace;
         l:=current_scanner.readval;
         l:=current_scanner.readval;
         if l>1024 then
         if l>1024 then
-         stacksize:=l;
-        current_scanner.skipspace;
-        if c=',' then
-         begin
-           current_scanner.readchar;
-           current_scanner.skipspace;
-           l:=current_scanner.readval;
-           if l>1024 then
-            heapsize:=l;
-         end;
-        if c=',' then
-         begin
-           current_scanner.readchar;
-           current_scanner.skipspace;
-           l:=current_scanner.readval;
-           { Ignore this value, because the limit is set by the OS
-             info and shouldn't be changed by the user (PFV) }
-         end;
+          stacksize:=l;
       end;
       end;
 
 
 
 
@@ -892,7 +906,7 @@ implementation
       begin
       begin
         if not (target_info.system in [system_i386_os2,system_i386_emx,
         if not (target_info.system in [system_i386_os2,system_i386_emx,
                  system_i386_win32,system_i386_netware,system_i386_wdosx,
                  system_i386_win32,system_i386_netware,system_i386_wdosx,
-		 system_i386_netwlibc]) then
+                 system_i386_netwlibc]) then
           begin
           begin
             Message(scan_n_version_not_support);
             Message(scan_n_version_not_support);
             exit;
             exit;
@@ -1034,6 +1048,7 @@ implementation
         AddDirective('ASSERTIONS',directive_all, @dir_assertions);
         AddDirective('ASSERTIONS',directive_all, @dir_assertions);
         AddDirective('BOOLEVAL',directive_all, @dir_booleval);
         AddDirective('BOOLEVAL',directive_all, @dir_booleval);
         AddDirective('CALLING',directive_all, @dir_calling);
         AddDirective('CALLING',directive_all, @dir_calling);
+        AddDirective('CHECKPOINTER',directive_all, @dir_checkpointer);
         AddDirective('CODEPAGE',directive_all, @dir_codepage);
         AddDirective('CODEPAGE',directive_all, @dir_codepage);
         AddDirective('COPYRIGHT',directive_all, @dir_copyright);
         AddDirective('COPYRIGHT',directive_all, @dir_copyright);
         AddDirective('D',directive_all, @dir_description);
         AddDirective('D',directive_all, @dir_description);
@@ -1115,7 +1130,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.44  2004-10-15 09:14:17  mazen
+  Revision 1.45  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.44  2004/10/15 09:14:17  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 32 - 1
compiler/scanner.pas

@@ -148,6 +148,7 @@ interface
           function  readcomment:string;
           function  readcomment:string;
           function  readquotedstring:string;
           function  readquotedstring:string;
           function  readstate:char;
           function  readstate:char;
+          function  readstatedefault:char;
           procedure skipspace;
           procedure skipspace;
           procedure skipuntildirective;
           procedure skipuntildirective;
           procedure skipcomment;
           procedure skipcomment;
@@ -2061,6 +2062,32 @@ implementation
       end;
       end;
 
 
 
 
+    function tscannerfile.readstatedefault:char;
+      var
+        state : char;
+      begin
+        state:=' ';
+        if c=' ' then
+         begin
+           current_scanner.skipspace;
+           current_scanner.readid;
+           if pattern='ON' then
+            state:='+'
+           else
+            if pattern='OFF' then
+             state:='-'
+            else
+             if pattern='DEFAULT' then
+              state:='*';
+         end
+        else
+         state:=c;
+        if not (state in ['+','-','*']) then
+         Message(scan_e_wrong_switch_toggle_default);
+        readstatedefault:=state;
+      end;
+
+
     procedure tscannerfile.skipspace;
     procedure tscannerfile.skipspace;
       begin
       begin
         repeat
         repeat
@@ -3263,7 +3290,11 @@ exit_label:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.92  2004-10-15 09:14:17  mazen
+  Revision 1.93  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.92  2004/10/15 09:14:17  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 7 - 4
compiler/systems.pas

@@ -111,7 +111,7 @@ interface
              system_arm_linux,          { 31 }
              system_arm_linux,          { 31 }
              system_i386_watcom,        { 32 }
              system_i386_watcom,        { 32 }
              system_powerpc_MorphOS,    { 33 }
              system_powerpc_MorphOS,    { 33 }
-	     system_x86_64_freebsd,     { 34 }
+             system_x86_64_freebsd,     { 34 }
              system_i386_netwlibc       { 35 }
              system_i386_netwlibc       { 35 }
        );
        );
 
 
@@ -281,7 +281,6 @@ interface
             (see also FIRST_PARM_OFFSET in GCC source)
             (see also FIRST_PARM_OFFSET in GCC source)
           }
           }
           first_parm_offset : longint;
           first_parm_offset : longint;
-          heapsize,
           stacksize       : longint;
           stacksize       : longint;
           DllScanSupported : boolean;
           DllScanSupported : boolean;
           use_function_relative_addresses : boolean;
           use_function_relative_addresses : boolean;
@@ -342,7 +341,7 @@ interface
     procedure InitSystems;
     procedure InitSystems;
 
 
     {$ifdef FreeBSD}
     {$ifdef FreeBSD}
-	function GetOSRelDate:Longint;
+        function GetOSRelDate:Longint;
     {$endif}
     {$endif}
 
 
 implementation
 implementation
@@ -703,7 +702,11 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.92  2004-09-04 21:18:47  armin
+  Revision 1.93  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.92  2004/09/04 21:18:47  armin
   * target netwlibc added (libc is preferred for newer netware versions)
   * target netwlibc added (libc is preferred for newer netware versions)
 
 
   Revision 1.91  2004/06/29 21:00:08  peter
   Revision 1.91  2004/06/29 21:00:08  peter

+ 5 - 2
compiler/systems/i_amiga.pas

@@ -85,7 +85,6 @@ unit i_amiga;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -102,7 +101,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.5  2004-06-20 08:55:32  florian
+  Revision 1.6  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.5  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 5 - 2
compiler/systems/i_atari.pas

@@ -68,7 +68,6 @@ unit i_atari;
             endian       : endian_big;
             endian       : endian_big;
             stackalignment : 2;
             stackalignment : 2;
             maxCrecordalignment : 4;
             maxCrecordalignment : 4;
-            heapsize     : 16*1024;
             stacksize    : 8192;
             stacksize    : 8192;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : false
             use_function_relative_addresses : false
@@ -85,7 +84,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2004-06-20 08:55:32  florian
+  Revision 1.4  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.3  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 5 - 2
compiler/systems/i_beos.pas

@@ -85,7 +85,6 @@ unit i_beos;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 8192;
             stacksize    : 8192;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -102,7 +101,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.5  2004-06-20 08:55:32  florian
+  Revision 1.6  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.5  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
   Revision 1.4  2004/02/22 16:51:50  peter
   Revision 1.4  2004/02/22 16:51:50  peter

+ 6 - 9
compiler/systems/i_bsd.pas

@@ -88,7 +88,6 @@ unit i_bsd;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize    : 256*1024;
             stacksize   : 262144;
             stacksize   : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -152,7 +151,6 @@ unit i_bsd;
                 maxCrecordalign : 8
                 maxCrecordalign : 8
               );
               );
             first_parm_offset : 16;
             first_parm_offset : 16;
-            heapsize     : 256*1024;
             stacksize    : 256*1024;
             stacksize    : 256*1024;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -216,7 +214,6 @@ unit i_bsd;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize    : 256*1024;
             stacksize   : 262144;
             stacksize   : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -279,7 +276,6 @@ unit i_bsd;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize    : 256*1024;
             stacksize   : 262144;
             stacksize   : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -342,7 +338,6 @@ unit i_bsd;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize    : 256*1024;
             stacksize   : 262144;
             stacksize   : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -402,10 +397,9 @@ unit i_bsd;
                 localalignmax   : 4;
                 localalignmax   : 4;
                 recordalignmin  : 0;
                 recordalignmin  : 0;
                 recordalignmax  : 2;
                 recordalignmax  : 2;
-                maxCrecordalign : 4	// should be 8 probably
+                maxCrecordalign : 4     // should be 8 probably
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 32*1024*1024;
             stacksize    : 32*1024*1024;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -471,7 +465,6 @@ unit i_bsd;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 24;
             first_parm_offset : 24;
-            heapsize    : 256*1024;
             stacksize   : 262144;
             stacksize   : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : false;
             use_function_relative_addresses : false;
@@ -513,7 +506,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  2004-09-12 20:33:21  olle
+  Revision 1.14  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.13  2004/09/12 20:33:21  olle
     * Updated compiler status
     * Updated compiler status
 
 
   Revision 1.12  2004/06/20 08:55:32  florian
   Revision 1.12  2004/06/20 08:55:32  florian

+ 5 - 2
compiler/systems/i_emx.pas

@@ -93,7 +93,6 @@ unit i_emx;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 256*1024;
             stacksize    : 256*1024;
             DllScanSupported: false;
             DllScanSupported: false;
             use_function_relative_addresses : false
             use_function_relative_addresses : false
@@ -116,7 +115,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2004-06-20 08:55:32  florian
+  Revision 1.5  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.4  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
   Revision 1.3  2004/05/16 20:41:19  hajny
   Revision 1.3  2004/05/16 20:41:19  hajny

+ 5 - 2
compiler/systems/i_go32v2.pas

@@ -85,7 +85,6 @@ unit i_go32v2;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 2048*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported : false;
             DllScanSupported : false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -102,7 +101,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2004-06-20 08:55:32  florian
+  Revision 1.4  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.3  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 5 - 8
compiler/systems/i_linux.pas

@@ -85,7 +85,6 @@ unit i_linux;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -149,7 +148,6 @@ unit i_linux;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 128*1024;
             stacksize    : 32*1024*1024;
             stacksize    : 32*1024*1024;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -213,7 +211,6 @@ unit i_linux;
                 maxCrecordalign : 8
                 maxCrecordalign : 8
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 32*1024*1024;
             stacksize    : 32*1024*1024;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -277,7 +274,6 @@ unit i_linux;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 32*1024*1024;
             stacksize    : 32*1024*1024;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -341,7 +337,6 @@ unit i_linux;
                 maxCrecordalign : 8
                 maxCrecordalign : 8
               );
               );
             first_parm_offset : 16;
             first_parm_offset : 16;
-            heapsize     : 256*1024;
             stacksize    : 256*1024;
             stacksize    : 256*1024;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -405,7 +400,6 @@ unit i_linux;
                 maxCrecordalign : 8
                 maxCrecordalign : 8
               );
               );
             first_parm_offset : 92;
             first_parm_offset : 92;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -469,7 +463,6 @@ unit i_linux;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -520,7 +513,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.30  2004-10-24 13:36:26  peter
+  Revision 1.31  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.30  2004/10/24 13:36:26  peter
     * gc-sections added when section smartlinking is used
     * gc-sections added when section smartlinking is used
 
 
   Revision 1.29  2004/08/15 13:30:18  florian
   Revision 1.29  2004/08/15 13:30:18  florian

+ 5 - 2
compiler/systems/i_macos.pas

@@ -84,7 +84,6 @@ unit i_macos;
                 maxCrecordalign : 16
                 maxCrecordalign : 16
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -102,7 +101,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  2004-09-12 20:33:21  olle
+  Revision 1.18  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.17  2004/09/12 20:33:21  olle
     * Updated compiler status
     * Updated compiler status
 
 
   Revision 1.16  2004/07/05 21:26:35  olle
   Revision 1.16  2004/07/05 21:26:35  olle

+ 5 - 2
compiler/systems/i_morph.pas

@@ -85,7 +85,6 @@ unit i_morph;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true;
             use_function_relative_addresses : true;
@@ -103,7 +102,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2004-04-08 00:03:51  karoly
+  Revision 1.4  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.3  2004/04/08 00:03:51  karoly
    * mos uses sysv abi, not aix
    * mos uses sysv abi, not aix
 
 
   Revision 1.2  2004/03/15 07:26:44  karoly
   Revision 1.2  2004/03/15 07:26:44  karoly

+ 5 - 2
compiler/systems/i_nwl.pas

@@ -85,7 +85,6 @@ unit i_nwl;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 16384;
             stacksize    : 16384;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -102,7 +101,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  2004-09-26 19:51:02  armin
+  Revision 1.3  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.2  2004/09/26 19:51:02  armin
   * added define netware and netware_libc for target netwlibc, netware_clib for netware
   * added define netware and netware_libc for target netwlibc, netware_clib for netware
 
 
   Revision 1.1  2004/09/04 21:18:47  armin
   Revision 1.1  2004/09/04 21:18:47  armin

+ 5 - 2
compiler/systems/i_nwm.pas

@@ -85,7 +85,6 @@ unit i_nwm;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 16384;
             stacksize    : 16384;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -102,7 +101,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  2004-09-26 19:51:02  armin
+  Revision 1.8  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.7  2004/09/26 19:51:02  armin
   * added define netware and netware_libc for target netwlibc, netware_clib for netware
   * added define netware and netware_libc for target netwlibc, netware_clib for netware
 
 
   Revision 1.6  2004/07/31 22:52:58  armin
   Revision 1.6  2004/07/31 22:52:58  armin

+ 5 - 2
compiler/systems/i_os2.pas

@@ -93,7 +93,6 @@ unit i_os2;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 256*1024;
             stacksize    : 256*1024;
             DllScanSupported: false;
             DllScanSupported: false;
             use_function_relative_addresses : false
             use_function_relative_addresses : false
@@ -116,7 +115,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.5  2004-06-20 08:55:32  florian
+  Revision 1.6  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.5  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
   Revision 1.4  2004/05/16 20:41:19  hajny
   Revision 1.4  2004/05/16 20:41:19  hajny

+ 5 - 2
compiler/systems/i_palmos.pas

@@ -68,7 +68,6 @@ unit i_palmos;
             endian       : endian_big;
             endian       : endian_big;
             stackalignment : 2;
             stackalignment : 2;
             maxCrecordalignment : 4;
             maxCrecordalignment : 4;
-            heapsize     : 128*1024;
             stacksize    : 8192;
             stacksize    : 8192;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : false
             use_function_relative_addresses : false
@@ -92,7 +91,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2004-06-20 08:55:32  florian
+  Revision 1.4  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.3  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 5 - 3
compiler/systems/i_sunos.pas

@@ -85,7 +85,6 @@ unit i_sunos;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -148,7 +147,6 @@ unit i_sunos;
                 maxCrecordalign : 8
                 maxCrecordalign : 8
               );
               );
             first_parm_offset : 92;
             first_parm_offset : 92;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:false;
             DllScanSupported:false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -171,7 +169,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2004-10-01 17:41:21  marco
+  Revision 1.5  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.4  2004/10/01 17:41:21  marco
    * small updates to make playing with sparc/sunos easier
    * small updates to make playing with sparc/sunos easier
 
 
   Revision 1.3  2004/06/20 08:55:32  florian
   Revision 1.3  2004/06/20 08:55:32  florian

+ 5 - 2
compiler/systems/i_watcom.pas

@@ -87,7 +87,6 @@ unit i_watcom;
                 maxCrecordalign : 4
                 maxCrecordalign : 4
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 2048*1024;
             stacksize    : 16384;
             stacksize    : 16384;
             DllScanSupported : false;
             DllScanSupported : false;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -104,7 +103,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2004-06-20 08:55:32  florian
+  Revision 1.5  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.4  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 5 - 2
compiler/systems/i_wdosx.pas

@@ -85,7 +85,6 @@ unit i_wdosx;
                 maxCrecordalign : 16
                 maxCrecordalign : 16
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 32*1024*1024;
             stacksize    : 32*1024*1024;
             DllScanSupported:true;
             DllScanSupported:true;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -104,7 +103,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2004-06-20 08:55:32  florian
+  Revision 1.7  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.6  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 5 - 2
compiler/systems/i_win32.pas

@@ -93,7 +93,6 @@ unit i_win32;
                 maxCrecordalign : 16
                 maxCrecordalign : 16
               );
               );
             first_parm_offset : 8;
             first_parm_offset : 8;
-            heapsize     : 256*1024;
             stacksize    : 262144;
             stacksize    : 262144;
             DllScanSupported:true;
             DllScanSupported:true;
             use_function_relative_addresses : true
             use_function_relative_addresses : true
@@ -112,7 +111,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2004-08-28 20:01:46  peter
+  Revision 1.10  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.9  2004/08/28 20:01:46  peter
     * enable case sensitive to support mixed case unit/filenames
     * enable case sensitive to support mixed case unit/filenames
 
 
   Revision 1.8  2004/06/20 08:55:32  florian
   Revision 1.8  2004/06/20 08:55:32  florian

+ 10 - 6
compiler/systems/t_bsd.pas

@@ -330,11 +330,11 @@ begin
       if (target_info.system =system_i386_freebsd) and linkpthread Then
       if (target_info.system =system_i386_freebsd) and linkpthread Then
         Begin
         Begin
           if not (cs_link_pthread in aktglobalswitches) Then
           if not (cs_link_pthread in aktglobalswitches) Then
-	    begin
-	      {delete pthreads from list, in this case it is in libc_r}
-	      SharedLibFiles.Remove(SharedLibFiles.Find('pthread').str);
-	      LibrarySuffix:='r';
-	    end;
+            begin
+              {delete pthreads from list, in this case it is in libc_r}
+              SharedLibFiles.Remove(SharedLibFiles.Find('pthread').str);
+              LibrarySuffix:='r';
+            end;
         End;
         End;
       prtobj:='prt0';
       prtobj:='prt0';
       cprtobj:='cprt0';
       cprtobj:='cprt0';
@@ -627,7 +627,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.22  2004-10-14 18:16:17  mazen
+  Revision 1.23  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.22  2004/10/14 18:16:17  mazen
   * USE_SYSUTILS merged successfully : cycles with and without defines
   * USE_SYSUTILS merged successfully : cycles with and without defines
   * Need to be optimized in performance
   * Need to be optimized in performance
 
 

+ 7 - 3
compiler/systems/t_emx.pas

@@ -470,12 +470,12 @@ begin
      if binstr<>'' then
      if binstr<>'' then
       begin
       begin
         { Is this really required? Not anymore according to my EMX docs }
         { Is this really required? Not anymore according to my EMX docs }
-        Replace(cmdstr,'$HEAPMB',tostr((heapsize+1048575) shr 20));
+        Replace(cmdstr,'$HEAPMB',tostr((1048575) shr 20));
         {Size of the stack when an EMX program runs in OS/2.}
         {Size of the stack when an EMX program runs in OS/2.}
         Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
         Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
         {When an EMX program runs in DOS, the heap and stack share the
         {When an EMX program runs in DOS, the heap and stack share the
          same memory pool. The heap grows upwards, the stack grows downwards.}
          same memory pool. The heap grows upwards, the stack grows downwards.}
-        Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+heapsize+1023) shr 10));
+        Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
         Replace(cmdstr,'$STRIP',StripStr);
         Replace(cmdstr,'$STRIP',StripStr);
         Replace(cmdstr,'$APPTYPE',AppTypeStr);
         Replace(cmdstr,'$APPTYPE',AppTypeStr);
         Replace(cmdstr,'$RES',outputexedir+Info.ResName);
         Replace(cmdstr,'$RES',outputexedir+Info.ResName);
@@ -513,7 +513,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2004-10-15 09:24:38  mazen
+  Revision 1.10  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.9  2004/10/15 09:24:38  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 9 - 5
compiler/systems/t_macos.pas

@@ -70,7 +70,7 @@ begin
   if name<>'' then
   if name<>'' then
    begin
    begin
      aprocdef.setmangledname(name);
      aprocdef.setmangledname(name);
-   end  
+   end
   else
   else
     message(parser_e_empty_import_name);
     message(parser_e_empty_import_name);
 end;
 end;
@@ -149,15 +149,15 @@ begin
           if s<>'' then
           if s<>'' then
             Add(s+' '#182);
             Add(s+' '#182);
         end;
         end;
-    
+
       {Add last lines of the link command}
       {Add last lines of the link command}
       if apptype = app_tool then
       if apptype = app_tool then
         Add('-t "MPST" -c "MPS " '#182);
         Add('-t "MPST" -c "MPS " '#182);
 
 
       if apptype = app_cui then {If SIOW, to avoid some warnings.}
       if apptype = app_cui then {If SIOW, to avoid some warnings.}
-        Add('-ignoredups __start -ignoredups .__start -ignoredups main -ignoredups .main '#182); 
+        Add('-ignoredups __start -ignoredups .__start -ignoredups main -ignoredups .main '#182);
 
 
-      Add('-tocdataref off -sym on -dead on -o '+ ScriptFixFileName(current_module.exefilename^)); 
+      Add('-tocdataref off -sym on -dead on -o '+ ScriptFixFileName(current_module.exefilename^));
 
 
       Add('Exit If "{Status}" != 0');
       Add('Exit If "{Status}" != 0');
 
 
@@ -252,7 +252,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  2004-09-13 16:13:04  olle
+  Revision 1.13  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.12  2004/09/13 16:13:04  olle
     + When link on target, the script sets file type on link.res
     + When link on target, the script sets file type on link.res
 
 
   Revision 1.11  2004/08/20 10:30:00  olle
   Revision 1.11  2004/08/20 10:30:00  olle

+ 6 - 2
compiler/systems/t_morph.pas

@@ -199,7 +199,7 @@ begin
   success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
   success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
 
 
 { Stripping Enabled? }
 { Stripping Enabled? }
-  { Under MorphOS a separate strip command is needed, to avoid stripping } 
+  { Under MorphOS a separate strip command is needed, to avoid stripping }
   { __abox__ symbol, which is required to be present in current MorphOS }
   { __abox__ symbol, which is required to be present in current MorphOS }
   { executables. }
   { executables. }
   if success and (cs_link_strip in aktglobalswitches) then
   if success and (cs_link_strip in aktglobalswitches) then
@@ -228,7 +228,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  2004-06-20 08:55:32  florian
+  Revision 1.8  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.7  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
   Revision 1.6  2004/06/08 15:04:23  karoly
   Revision 1.6  2004/06/08 15:04:23  karoly

+ 31 - 27
compiler/systems/t_nwl.pas

@@ -47,10 +47,10 @@
     to be in unix-format for exe2nlm)
     to be in unix-format for exe2nlm)
     By default, the most import files are included in freepascal.
     By default, the most import files are included in freepascal.
 
 
-    e.g. function getgrnam(name:Pchar):Pgroup;cdecl;external 'libc' 'getgrnam';   
+    e.g. function getgrnam(name:Pchar):Pgroup;cdecl;external 'libc' 'getgrnam';
     sets IMPORT @libc.imp and MODULE libc.
     sets IMPORT @libc.imp and MODULE libc.
     To avoid setting the autoload, use ! in the name, e.g.
     To avoid setting the autoload, use ! in the name, e.g.
-    procedure EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';   
+    procedure EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
 
 
     Function simply defined as external work without generating autoload and
     Function simply defined as external work without generating autoload and
     IMPORT but you will get a warning from nlmconv.
     IMPORT but you will get a warning from nlmconv.
@@ -75,10 +75,10 @@
 
 
     compile with:
     compile with:
     ppc386 -Tnetwlibc hello
     ppc386 -Tnetwlibc hello
-    
+
     Libraries are supported but this needs at least netware 5.1 sp6,
     Libraries are supported but this needs at least netware 5.1 sp6,
     6.0 sp3 or netware 6.5
     6.0 sp3 or netware 6.5
-    
+
     In case there is a xdc file with the same name as the nlm name,
     In case there is a xdc file with the same name as the nlm name,
     this file will be used for nlmconv. Otherwise a temp xdc will
     this file will be used for nlmconv. Otherwise a temp xdc will
     be created and used.
     be created and used.
@@ -368,7 +368,7 @@ begin
 
 
   if isDll then  {needed to provide main}
   if isDll then  {needed to provide main}
     s2 := FindObjectFile('nwl_dlle','',false)
     s2 := FindObjectFile('nwl_dlle','',false)
-  else    
+  else
     s2 := FindObjectFile('nwl_main','',false);
     s2 := FindObjectFile('nwl_main','',false);
   Comment (V_Debug,'adding Object File '+s2);
   Comment (V_Debug,'adding Object File '+s2);
   {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
   {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
@@ -420,7 +420,7 @@ begin
          if (pos ('.a',s) <> 0) OR (pos ('.A', s) <> 0) then
          if (pos ('.a',s) <> 0) OR (pos ('.A', s) <> 0) then
          begin
          begin
            S2 := FindObjectFile(s,'',false);
            S2 := FindObjectFile(s,'',false);
-	   {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
+           {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
            Comment(V_Debug,'adding Object File (StaticLibFiles) '+S2);
            Comment(V_Debug,'adding Object File (StaticLibFiles) '+S2);
          end else
          end else
          begin
          begin
@@ -429,10 +429,10 @@ begin
              Delete(S,i,255);
              Delete(S,i,255);
            S := S + '.imp'; S2 := '';
            S := S + '.imp'; S2 := '';
            librarysearchpath.FindFile(S,S2);
            librarysearchpath.FindFile(S,S2);
-	   {$ifdef netware}
-	   Comment(V_Debug,'IMPORT @'+s2);
-	   s2 := FExpand (S2);
-	   {$endif}
+           {$ifdef netware}
+           Comment(V_Debug,'IMPORT @'+s2);
+           s2 := FExpand (S2);
+           {$endif}
            NLMConvLinkFile.Add('IMPORT @'+S2);
            NLMConvLinkFile.Add('IMPORT @'+S2);
            Comment(V_Debug,'IMPORT @'+s2);
            Comment(V_Debug,'IMPORT @'+s2);
          end;
          end;
@@ -450,7 +450,7 @@ begin
          Here we are setting the import-files for nlmconv. I.e. for
          Here we are setting the import-files for nlmconv. I.e. for
          the module libc or libc.nlm we add IMPORT @libc.imp and also
          the module libc or libc.nlm we add IMPORT @libc.imp and also
          the module libc.nlm (autoload)
          the module libc.nlm (autoload)
-	 If a lib name begins with !, only the IMPORT will be generated
+         If a lib name begins with !, only the IMPORT will be generated
          ? may it be better to set autoload's via StaticLibFiles ? }
          ? may it be better to set autoload's via StaticLibFiles ? }
         S:=lower (SharedLibFiles.GetFirst);
         S:=lower (SharedLibFiles.GetFirst);
         if s<>'' then
         if s<>'' then
@@ -459,30 +459,30 @@ begin
            i:=Pos(target_info.sharedlibext,S);
            i:=Pos(target_info.sharedlibext,S);
            if i>0 then
            if i>0 then
              Delete(S,i,255);
              Delete(S,i,255);
-	   if s[1] = '!' then
-	   begin  // special, with ! only the imp will be included but no module is autoloaded, needed i.e. for netware.imp inlcuded in libc ndk
-	     delete (s,1,1);
-	     S := S + '.imp';
+           if s[1] = '!' then
+           begin  // special, with ! only the imp will be included but no module is autoloaded, needed i.e. for netware.imp inlcuded in libc ndk
+             delete (s,1,1);
+             S := S + '.imp';
              librarysearchpath.FindFile(S,S3);
              librarysearchpath.FindFile(S,S3);
-	     {$ifdef netware}
-	     Comment(V_Debug,'IMPORT @'+S3);
-	     S3 := FExpand (S3);
-	     {$endif}
+             {$ifdef netware}
+             Comment(V_Debug,'IMPORT @'+S3);
+             S3 := FExpand (S3);
+             {$endif}
              NLMConvLinkFile.Add('IMPORT @'+S3);
              NLMConvLinkFile.Add('IMPORT @'+S3);
              Comment(V_Debug,'IMPORT @'+S3);
              Comment(V_Debug,'IMPORT @'+S3);
-	   end else
-	   begin
+           end else
+           begin
              S := S + '.imp';
              S := S + '.imp';
              librarysearchpath.FindFile(S,S3);
              librarysearchpath.FindFile(S,S3);
-	     {$ifdef netware}
-	     Comment(V_Debug,'IMPORT @'+S3);
-	     S3 := FExpand (S3);
-	     {$endif}
+             {$ifdef netware}
+             Comment(V_Debug,'IMPORT @'+S3);
+             S3 := FExpand (S3);
+             {$endif}
              NLMConvLinkFile.Add('IMPORT @'+S3);
              NLMConvLinkFile.Add('IMPORT @'+S3);
              NLMConvLinkFile.Add('MODULE '+s2);
              NLMConvLinkFile.Add('MODULE '+s2);
              Comment(V_Debug,'MODULE '+S2);
              Comment(V_Debug,'MODULE '+S2);
              Comment(V_Debug,'IMPORT @'+S3);
              Comment(V_Debug,'IMPORT @'+S3);
-	   end;
+           end;
          end
          end
       end;
       end;
    end;
    end;
@@ -653,7 +653,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  2004-10-14 18:16:17  mazen
+  Revision 1.8  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.7  2004/10/14 18:16:17  mazen
   * USE_SYSUTILS merged successfully : cycles with and without defines
   * USE_SYSUTILS merged successfully : cycles with and without defines
   * Need to be optimized in performance
   * Need to be optimized in performance
 
 

+ 16 - 12
compiler/systems/t_nwm.pas

@@ -375,12 +375,12 @@ begin
   {$else}
   {$else}
   NLMConvLinkFile.Add ('OUTPUT ' + FExpand(NlmNam));
   NLMConvLinkFile.Add ('OUTPUT ' + FExpand(NlmNam));
   {$endif}
   {$endif}
-  
+
   { start and stop-procedures }
   { start and stop-procedures }
   NLMConvLinkFile.Add ('START _Prelude');  { defined in rtl/netware/nwpre.as }
   NLMConvLinkFile.Add ('START _Prelude');  { defined in rtl/netware/nwpre.as }
   NLMConvLinkFile.Add ('EXIT _Stop');                             { nwpre.as }
   NLMConvLinkFile.Add ('EXIT _Stop');                             { nwpre.as }
   NLMConvLinkFile.Add ('CHECK FPC_NW_CHECKFUNCTION');            { system.pp }
   NLMConvLinkFile.Add ('CHECK FPC_NW_CHECKFUNCTION');            { system.pp }
-  
+
   if not (cs_link_strip in aktglobalswitches) then
   if not (cs_link_strip in aktglobalswitches) then
   begin
   begin
     NLMConvLinkFile.Add ('DEBUG');
     NLMConvLinkFile.Add ('DEBUG');
@@ -402,7 +402,7 @@ begin
          if (pos ('.a',s) <> 0) OR (pos ('.A', s) <> 0) then
          if (pos ('.a',s) <> 0) OR (pos ('.A', s) <> 0) then
          begin
          begin
            S2 := FindObjectFile(s,'',false);
            S2 := FindObjectFile(s,'',false);
-	   {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
+           {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
            Comment(V_Debug,'adding Object File (StaticLibFiles) '+S2);
            Comment(V_Debug,'adding Object File (StaticLibFiles) '+S2);
          end else
          end else
          begin
          begin
@@ -411,10 +411,10 @@ begin
              Delete(S,i,255);
              Delete(S,i,255);
            S := S + '.imp'; S2 := '';
            S := S + '.imp'; S2 := '';
            librarysearchpath.FindFile(S,S2);
            librarysearchpath.FindFile(S,S2);
-	   {$ifdef netware} 
-	   Comment(V_Debug,'IMPORT @'+s2);
-	   s2 := FExpand (S2); 
-	   {$endif}
+           {$ifdef netware}
+           Comment(V_Debug,'IMPORT @'+s2);
+           s2 := FExpand (S2);
+           {$endif}
            NLMConvLinkFile.Add('IMPORT @'+S2);
            NLMConvLinkFile.Add('IMPORT @'+S2);
            Comment(V_Debug,'IMPORT @'+s2);
            Comment(V_Debug,'IMPORT @'+s2);
          end;
          end;
@@ -442,10 +442,10 @@ begin
              Delete(S,i,255);
              Delete(S,i,255);
            S := S + '.imp';
            S := S + '.imp';
            librarysearchpath.FindFile(S,S3);
            librarysearchpath.FindFile(S,S3);
-	   {$ifdef netware} 
-	   Comment(V_Debug,'IMPORT @'+S3);
-	   S3 := FExpand (S3); 
-	   {$endif}
+           {$ifdef netware}
+           Comment(V_Debug,'IMPORT @'+S3);
+           S3 := FExpand (S3);
+           {$endif}
            NLMConvLinkFile.Add('IMPORT @'+S3);
            NLMConvLinkFile.Add('IMPORT @'+S3);
            NLMConvLinkFile.Add('MODULE '+s2);
            NLMConvLinkFile.Add('MODULE '+s2);
            Comment(V_Debug,'MODULE '+S2);
            Comment(V_Debug,'MODULE '+S2);
@@ -571,7 +571,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.18  2004-10-14 18:16:17  mazen
+  Revision 1.19  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.18  2004/10/14 18:16:17  mazen
   * USE_SYSUTILS merged successfully : cycles with and without defines
   * USE_SYSUTILS merged successfully : cycles with and without defines
   * Need to be optimized in performance
   * Need to be optimized in performance
 
 

+ 7 - 3
compiler/systems/t_os2.pas

@@ -470,12 +470,12 @@ begin
      if binstr<>'' then
      if binstr<>'' then
       begin
       begin
         { Is this really required? Not anymore according to my EMX docs }
         { Is this really required? Not anymore according to my EMX docs }
-        Replace(cmdstr,'$HEAPMB',tostr((heapsize+1048575) shr 20));
+        Replace(cmdstr,'$HEAPMB',tostr((1048575) shr 20));
         {Size of the stack when an EMX program runs in OS/2.}
         {Size of the stack when an EMX program runs in OS/2.}
         Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
         Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
         {When an EMX program runs in DOS, the heap and stack share the
         {When an EMX program runs in DOS, the heap and stack share the
          same memory pool. The heap grows upwards, the stack grows downwards.}
          same memory pool. The heap grows upwards, the stack grows downwards.}
-        Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+heapsize+1023) shr 10));
+        Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
         Replace(cmdstr,'$STRIP',StripStr);
         Replace(cmdstr,'$STRIP',StripStr);
         Replace(cmdstr,'$APPTYPE',AppTypeStr);
         Replace(cmdstr,'$APPTYPE',AppTypeStr);
         Replace(cmdstr,'$RES',outputexedir+Info.ResName);
         Replace(cmdstr,'$RES',outputexedir+Info.ResName);
@@ -513,7 +513,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  2004-10-15 09:24:38  mazen
+  Revision 1.14  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.13  2004/10/15 09:24:38  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code
 
 

+ 5 - 17
compiler/systems/t_wdosx.pas

@@ -36,7 +36,6 @@ implementation
 
 
   type
   type
     timportlibwdosx=class(timportlibwin32)
     timportlibwdosx=class(timportlibwin32)
-      procedure GetDefExt(var N:longint;var P:pStr4);override;
     end;
     end;
 
 
     texportlibwdosx=texportlibwin32;
     texportlibwdosx=texportlibwin32;
@@ -47,22 +46,12 @@ implementation
     end;
     end;
 
 
     tDLLScannerWdosx=class(tDLLScannerWin32)
     tDLLScannerWdosx=class(tDLLScannerWin32)
-    public
-      procedure GetDefExt(var N:longint;var P:pStr4);override;
     end;
     end;
 
 
-const
- DefaultDLLExtensions:array[1..2]of string[4]=('.WDL','.DLL');
-
 
 
 {*****************************************************************************
 {*****************************************************************************
                              TIMPORTLIBWDOSX
                              TIMPORTLIBWDOSX
 *****************************************************************************}
 *****************************************************************************}
-    procedure timportlibwdosx.GetDefExt(var N:longint;var P:pStr4);
-     begin
-      N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
-      pointer(P):=@DefaultDLLExtensions;
-     end;
 
 
 {*****************************************************************************
 {*****************************************************************************
                              TLINKERWDOSX
                              TLINKERWDOSX
@@ -80,11 +69,6 @@ end;
 {****************************************************************************
 {****************************************************************************
                             TDLLScannerWdosx
                             TDLLScannerWdosx
 ****************************************************************************}
 ****************************************************************************}
-    procedure tDLLScannerWdosx.GetDefExt(var N:longint;var P:pStr4);
-     begin
-      N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
-      pointer(P):=@DefaultDLLExtensions;
-     end;
 
 
 {*****************************************************************************
 {*****************************************************************************
                                      Initialize
                                      Initialize
@@ -102,7 +86,11 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2004-06-20 08:55:32  florian
+  Revision 1.5  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.4  2004/06/20 08:55:32  florian
     * logs truncated
     * logs truncated
 
 
 }
 }

+ 10 - 43
compiler/systems/t_win32.pas

@@ -55,7 +55,6 @@ interface
       procedure importvariable_str(const s:string;const name,module:string);
       procedure importvariable_str(const s:string;const name,module:string);
       procedure importprocedure_str(const func,module:string;index:longint;const name:string);
       procedure importprocedure_str(const func,module:string;index:longint;const name:string);
     public
     public
-      procedure GetDefExt(var N:longint;var P:pStr4);virtual;
       procedure preparelib(const s:string);override;
       procedure preparelib(const s:string);override;
       procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
       procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
       procedure importvariable(vs:tvarsym;const name,module:string);override;
       procedure importvariable(vs:tvarsym;const name,module:string);override;
@@ -94,7 +93,6 @@ interface
       function FindDLL(const s:string;var founddll:string):boolean;
       function FindDLL(const s:string;var founddll:string):boolean;
       function ExtractDllName(Const Name : string) : string;
       function ExtractDllName(Const Name : string) : string;
     public
     public
-      procedure GetDefExt(var N:longint;var P:pStr4);virtual;
       function isSuitableFileType(x:cardinal):longbool;override;
       function isSuitableFileType(x:cardinal):longbool;override;
       function GetEdata(HeaderEntry:cardinal):longbool;override;
       function GetEdata(HeaderEntry:cardinal):longbool;override;
       function Scan(const binname:string):longbool;override;
       function Scan(const binname:string):longbool;override;
@@ -105,33 +103,10 @@ implementation
   uses
   uses
     cpuinfo,cgutils;
     cpuinfo,cgutils;
 
 
-    function DllName(Const Name : string;NdefExt:longint;DefExt:pStr4) : string;
-      var n : string;
-          i:longint;
-      begin
-         n:=Upper(SplitExtension(Name));
-         for i:=1 to NdefExt do
-          if n=DefExt^[i]then
-           begin
-            DllName:=Name;
-            exit;
-           end
-         else
-           DllName:=Name+target_info.sharedlibext;
-      end;
-
-const
- DefaultDLLExtensions:array[1..MAX_DEFAULT_EXTENSIONS]of string[4]=('.DLL','.DRV','.EXE');
-
 
 
 {*****************************************************************************
 {*****************************************************************************
                              TIMPORTLIBWIN32
                              TIMPORTLIBWIN32
 *****************************************************************************}
 *****************************************************************************}
-    procedure timportlibwin32.GetDefExt(var N:longint;var P:pStr4);
-     begin
-      N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
-      pointer(P):=@DefaultDLLExtensions;
-     end;
 
 
     procedure timportlibwin32.preparelib(const s : string);
     procedure timportlibwin32.preparelib(const s : string);
       begin
       begin
@@ -145,15 +120,12 @@ const
          hp1 : timportlist;
          hp1 : timportlist;
          hp2 : twin32imported_item;
          hp2 : twin32imported_item;
          hs  : string;
          hs  : string;
-         PP  : pStr4;
-         NN  : longint;
       begin
       begin
          { force the current mangledname }
          { force the current mangledname }
          if assigned(aprocdef) then
          if assigned(aprocdef) then
            aprocdef.has_mangledname:=true;
            aprocdef.has_mangledname:=true;
          { append extension if required }
          { append extension if required }
-         GetDefExt(NN,PP);
-         hs:=DllName(module,NN,PP);
+         hs:=AddExtension(module,target_info.sharedlibext);
          { search for the module }
          { search for the module }
          hp1:=timportlist(current_module.imports.first);
          hp1:=timportlist(current_module.imports.first);
          while assigned(hp1) do
          while assigned(hp1) do
@@ -208,11 +180,8 @@ const
          hp1 : timportlist;
          hp1 : timportlist;
          hp2 : twin32imported_item;
          hp2 : twin32imported_item;
          hs  : string;
          hs  : string;
-         NN  : longint;
-         PP  : pStr4;
       begin
       begin
-         GetDefExt(NN,PP);
-         hs:=DllName(module,NN,PP);
+         hs:=AddExtension(module,target_info.sharedlibext);
          { search for the module }
          { search for the module }
          hp1:=timportlist(current_module.imports.first);
          hp1:=timportlist(current_module.imports.first);
          while assigned(hp1) do
          while assigned(hp1) do
@@ -1383,12 +1352,6 @@ end;
                             TDLLScannerWin32
                             TDLLScannerWin32
 ****************************************************************************}
 ****************************************************************************}
 
 
-    procedure tDLLScannerWin32.GetDefExt(var N:longint;var P:pStr4);
-     begin
-      N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
-      pointer(P):=@DefaultDLLExtensions;
-     end;
-
     function tDLLScannerWin32.DOSstubOK(var x:cardinal):boolean;
     function tDLLScannerWin32.DOSstubOK(var x:cardinal):boolean;
       begin
       begin
         blockread(f,TheWord,2,loaded);
         blockread(f,TheWord,2,loaded);
@@ -1611,16 +1574,16 @@ function tDLLScannerWin32.GetEdata(HeaderEntry:cardinal):longbool;
 function tDLLScannerWin32.scan(const binname:string):longbool;
 function tDLLScannerWin32.scan(const binname:string):longbool;
  var
  var
   OldFileMode:longint;
   OldFileMode:longint;
+  hs,
   foundimp : string;
   foundimp : string;
-  NN:longint;PP:pStr4;
  begin
  begin
    Scan:=false;
    Scan:=false;
   { is there already an import library the we will use that one }
   { is there already an import library the we will use that one }
   if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,foundimp) then
   if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,foundimp) then
    exit;
    exit;
   { check if we can find the dll }
   { check if we can find the dll }
-  GetDefExt(NN,PP);
-  if not FindDll(DLLName(binname,NN,PP),impname) then
+  hs:=AddExtension(binname,target_info.sharedlibext);
+  if not FindDll(hs,impname) then
    exit;
    exit;
   { read the dll file }
   { read the dll file }
   assign(f,impname);
   assign(f,impname);
@@ -1654,7 +1617,11 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.39  2004-10-15 09:24:38  mazen
+  Revision 1.40  2004-10-25 15:38:41  peter
+    * heap and heapsize removed
+    * checkpointer fixes
+
+  Revision 1.39  2004/10/15 09:24:38  mazen
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF DELPHI and related code
   - remove $IFDEF FPCPROCVAR and related code
   - remove $IFDEF FPCPROCVAR and related code