From 8473dada93c19f43c42d735b622c5acf927b3250 Mon Sep 17 00:00:00 2001 From: armin Date: Wed, 26 Mar 2003 12:50:54 +0000 Subject: [PATCH] * avoid problems with the ide in init/dome --- compiler/i386/aasmcpu.pas | 10 ++++++++-- compiler/tokens.pas | 22 ++++++++++++++++------ compiler/x86_64/aasmcpu.pas | 10 ++++++++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/compiler/i386/aasmcpu.pas b/compiler/i386/aasmcpu.pas index 848ae75a95..6f16128eb1 100644 --- a/compiler/i386/aasmcpu.pas +++ b/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 diff --git a/compiler/tokens.pas b/compiler/tokens.pas index eb1896bac0..24eb147eb6 100644 --- a/compiler/tokens.pas +++ b/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 diff --git a/compiler/x86_64/aasmcpu.pas b/compiler/x86_64/aasmcpu.pas index 29c9fb6859..96dd823cf4 100644 --- a/compiler/x86_64/aasmcpu.pas +++ b/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)