diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-08-20 08:34:41 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-08-20 08:34:41 +0000 |
commit | d7e6d961227d3fdadea87fa79589cb55a1e63df9 (patch) | |
tree | 69dbb49b0785c797353bba847ddd6cf191eb9d7a /compiler/fmodule.pas | |
parent | f27cd6094165bbed1b355c5592f24e464cec01e1 (diff) | |
download | fpc-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.pas | 5 |
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; |