Răsfoiți Sursa

- removed parameter 'full' from method tglobalstate.restore

Nikolay Nikolov 2 zile în urmă
părinte
comite
4afa4f43cd
3 a modificat fișierele cu 10 adăugiri și 13 ștergeri
  1. 1 1
      compiler/ctask.pas
  2. 7 10
      compiler/globstat.pas
  3. 2 2
      compiler/pmodules.pas

+ 1 - 1
compiler/ctask.pas

@@ -158,7 +158,7 @@ end;
 procedure ttask_list.RestoreState;
 begin
   if not module.is_reset then
-    state.restore(true);
+    state.restore;
   if assigned(current_scanner) and assigned(current_scanner.inputfile) then
       if current_scanner.inputfile.closed then
       begin

+ 7 - 10
compiler/globstat.pas

@@ -70,7 +70,7 @@ type
     procedure clearscanner;
     class procedure remove_scanner_from_states(scanner : tscannerfile); static;
     procedure save;
-    procedure restore(full : boolean);
+    procedure restore;
   end;
 
 procedure save_global_state(state:tglobalstate);
@@ -136,7 +136,7 @@ var
   procedure restore_global_state(state:tglobalstate);
 
   begin
-    state.restore(true);
+    state.restore;
   end;
 
   procedure tglobalstate.save;
@@ -181,7 +181,7 @@ var
       old_scanner:=current_scanner;
     end;
 
-  procedure tglobalstate.restore(full: boolean);
+  procedure tglobalstate.restore;
 
     begin
       { restore scanner }
@@ -207,13 +207,10 @@ var
 
       RestoreLocalVerbosity(current_settings.pmessage);
 
-      if full then
-        begin
-          set_current_module(old_current_module);
-          // These can be different
-          current_asmdata:=old_asmdata;
-          current_debuginfo:=old_debuginfo;
-        end;
+      set_current_module(old_current_module);
+      // These can be different
+      current_asmdata:=old_asmdata;
+      current_debuginfo:=old_debuginfo;
     end;
 
     constructor tglobalstate.create;

+ 2 - 2
compiler/pmodules.pas

@@ -366,7 +366,7 @@ implementation
         current_scanner.tempcloseinputfile;
         state:=tglobalstate.create;
         load_intern_types;
-        state.restore(true);
+        state.restore;
         FreeAndNil(state);
         current_scanner.tempopeninputfile;
 
@@ -712,7 +712,7 @@ implementation
          procedure restorestate;
 
          begin
-           state.restore(true);
+           state.restore;
            if assigned(current_scanner) and (current_module.scanner=current_scanner) then
               begin
               if assigned(current_scanner.inputfile) then