summaryrefslogtreecommitdiff
path: root/compiler/fmodule.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-08-20 08:34:41 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-08-20 08:34:41 +0000
commitd7e6d961227d3fdadea87fa79589cb55a1e63df9 (patch)
tree69dbb49b0785c797353bba847ddd6cf191eb9d7a /compiler/fmodule.pas
parentf27cd6094165bbed1b355c5592f24e464cec01e1 (diff)
downloadfpc-d7e6d961227d3fdadea87fa79589cb55a1e63df9.tar.gz
+ getsingletonarraydef() function to get a (reused if possible) def for
an array of one element of the specified type git-svn-id: http://svn.freepascal.org/svn/fpc/branches/jvmbackend@18773 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/fmodule.pas')
-rw-r--r--compiler/fmodule.pas5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/fmodule.pas b/compiler/fmodule.pas
index bff735d8cf..24fded40bc 100644
--- a/compiler/fmodule.pas
+++ b/compiler/fmodule.pas
@@ -144,6 +144,7 @@ interface
deflist,
symlist : TFPObjectList;
ptrdefs : THashSet; { list of pointerdefs created in this module so we can reuse them (not saved/restored) }
+ arraydefs : THashSet; { list of single-element-arraydefs created in this module so we can reuse them (not saved/restored) }
wpoinfo : tunitwpoinfobase; { whole program optimization-related information that is generated during the current run for this unit }
globalsymtable, { pointer to the global symtable of this unit }
localsymtable : TSymtable;{ pointer to the local symtable of this unit }
@@ -527,6 +528,7 @@ implementation
deflist:=TFPObjectList.Create(false);
symlist:=TFPObjectList.Create(false);
ptrdefs:=THashSet.Create(64,true,false);
+ arraydefs:=THashSet.Create(64,true,false);
wpoinfo:=nil;
checkforwarddefs:=TFPObjectList.Create(false);
extendeddefs := TFPHashObjectList.Create(true);
@@ -643,6 +645,7 @@ implementation
deflist.free;
symlist.free;
ptrdefs.free;
+ arraydefs.free;
wpoinfo.free;
checkforwarddefs.free;
globalsymtable.free;
@@ -704,6 +707,8 @@ implementation
symlist:=TFPObjectList.Create(false);
ptrdefs.free;
ptrdefs:=THashSet.Create(64,true,false);
+ arraydefs.free;
+ arraydefs:=THashSet.Create(64,true,false);
wpoinfo.free;
wpoinfo:=nil;
checkforwarddefs.free;