Przeglądaj źródła

* (re)create the module's waitingforunit and local*searchpath fields when it
is reset (mantis #28814)
o if they are freed in end_of_parsing, they need to be recreated in case the
unit needs to be recompiled anyway during the current run
o in other cases they need to be reset since they will be repopulated during
the recompilation

git-svn-id: trunk@34069 -

Jonas Maebe 9 lat temu
rodzic
commit
d4281d6111
1 zmienionych plików z 15 dodań i 0 usunięć
  1. 15 0
      compiler/fmodule.pas

+ 15 - 0
compiler/fmodule.pas

@@ -815,6 +815,11 @@ implementation
         resourcefiles:=TCmdStrList.Create;
         pendingspecializations.free;
         pendingspecializations:=tfphashobjectlist.create(false);
+        if assigned(waitingforunit) and
+          (waitingforunit.count<>0) then
+          internalerror(2016070501);
+        waitingforunit.free;
+        waitingforunit:=tfpobjectlist.create(false);;
         linkunitofiles.Free;
         linkunitofiles:=TLinkContainer.Create;
         linkunitstaticlibs.Free;
@@ -842,6 +847,16 @@ implementation
         stringdispose(namespace);
         tcinitcode.free;
         tcinitcode:=nil;
+        localunitsearchpath.Free;
+        localunitsearchpath:=TSearchPathList.Create;
+        localobjectsearchpath.free;
+        localobjectsearchpath:=TSearchPathList.Create;
+        localincludesearchpath.free;
+        localincludesearchpath:=TSearchPathList.Create;
+        locallibrarysearchpath.free;
+        locallibrarysearchpath:=TSearchPathList.Create;
+        localframeworksearchpath.free;
+        localframeworksearchpath:=TSearchPathList.Create;
         moduleoptions:=[];
         is_dbginfo_written:=false;
         crc:=0;