Bläddra i källkod

* avoid problems with the ide in init/dome

armin 22 år sedan
förälder
incheckning
8473dada93
3 ändrade filer med 32 tillägg och 10 borttagningar
  1. 8 2
      compiler/i386/aasmcpu.pas
  2. 16 6
      compiler/tokens.pas
  3. 8 2
      compiler/x86_64/aasmcpu.pas

+ 8 - 2
compiler/i386/aasmcpu.pas

@@ -1935,7 +1935,10 @@ implementation
       begin
 {$ifndef NOAG386BIN}
         if assigned(instabcache) then
-         dispose(instabcache);
+        begin
+          dispose(instabcache);
+          instabcache:=nil;
+        end;
 {$endif NOAG386BIN}
       end;
 
@@ -1944,7 +1947,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.14  2003-03-08 08:59:07  daniel
+  Revision 1.15  2003-03-26 12:50:54  armin
+  * avoid problems with the ide in init/dome
+
+  Revision 1.14  2003/03/08 08:59:07  daniel
     + $define newra will enable new register allocator
     + getregisterint will return imaginary registers with $newra
     + -sr switch added, will skip register allocation so you can see

+ 16 - 6
compiler/tokens.pas

@@ -484,22 +484,32 @@ end;
 
 procedure inittokens;
 begin
-  tokeninfo:=@arraytokeninfo;
-  new(tokenidx);
-  create_tokenidx;
+  if tokenidx = nil then
+  begin
+    tokeninfo:=@arraytokeninfo;
+    new(tokenidx);
+    create_tokenidx;
+  end;
 end;
 
 
 procedure donetokens;
 begin
-  tokeninfo:=nil;
-  dispose(tokenidx);
+  if tokenidx <> nil then
+  begin
+    tokeninfo:=nil;
+    dispose(tokenidx);
+    tokenidx:=nil;
+  end;
 end;
 
 end.
 {
   $Log$
-  Revision 1.20  2002-11-29 22:31:21  carl
+  Revision 1.21  2003-03-26 12:50:54  armin
+  * avoid problems with the ide in init/dome
+
+  Revision 1.20  2002/11/29 22:31:21  carl
     + unimplemented hint directive added
     * hint directive parsing implemented
     * warning on these directives

+ 8 - 2
compiler/x86_64/aasmcpu.pas

@@ -1796,7 +1796,10 @@ implementation
       begin
 {$ifndef NOAG386BIN}
         if assigned(instabcache) then
-         dispose(instabcache);
+	begin
+          dispose(instabcache);
+	  instabcache:=nil;
+	end;
 {$endif NOAG386BIN}
       end;
 
@@ -1805,7 +1808,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.5  2003-01-05 13:36:53  florian
+  Revision 1.6  2003-03-26 12:50:54  armin
+  * avoid problems with the ide in init/dome
+
+  Revision 1.5  2003/01/05 13:36:53  florian
     * x86-64 compiles
     + very basic support for float128 type (x86-64 only)