summaryrefslogtreecommitdiff
path: root/compiler/ngtcon.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-06-23 21:23:18 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-06-23 21:23:18 +0000
commitb1da64abf23daf8eec13b3d1b2c3d3062dafe5a5 (patch)
tree8aa25a7eb1ce4c2fb0d49b7566d330cbb99a6ef8 /compiler/ngtcon.pas
parent1d0501dcf2574fecc11a8562c8bc790601c97dfd (diff)
downloadfpc-b1da64abf23daf8eec13b3d1b2c3d3062dafe5a5.tar.gz
* changed getarraydef() into a tarraydef.getreusable() class method
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@31147 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ngtcon.pas')
-rw-r--r--compiler/ngtcon.pas10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/ngtcon.pas b/compiler/ngtcon.pas
index ca02b35df7..9f1b7327eb 100644
--- a/compiler/ngtcon.pas
+++ b/compiler/ngtcon.pas
@@ -552,7 +552,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
fillchar(ca[strlength],def.size-strlength-1,' ');
ca[strlength]:=#0;
ca[def.size-1]:=#0;
- ftcb.emit_tai(Tai_string.Create_pchar(ca,def.size-1),getarraydef(cansichartype,def.size-1));
+ ftcb.emit_tai(Tai_string.Create_pchar(ca,def.size-1),carraydef.getreusable(cansichartype,def.size-1));
ftcb.maybe_end_aggregate(def);
end;
st_ansistring:
@@ -830,14 +830,14 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
len:=255;
getmem(ca,len+1);
move(tstringconstnode(node).value_str^,ca^,len+1);
- datadef:=getarraydef(cansichartype,len+1);
+ datadef:=carraydef.getreusable(cansichartype,len+1);
datatcb.maybe_begin_aggregate(datadef);
datatcb.emit_tai(Tai_string.Create_pchar(ca,len+1),datadef);
datatcb.maybe_end_aggregate(datadef);
end
else if is_constcharnode(node) then
begin
- datadef:=getarraydef(cansichartype,2);
+ datadef:=carraydef.getreusable(cansichartype,2);
datatcb.maybe_begin_aggregate(datadef);
datatcb.emit_tai(Tai_string.Create(char(byte(tordconstnode(node).value.svalue))+#0),datadef);
datatcb.maybe_end_aggregate(datadef);
@@ -845,7 +845,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
else
begin
IncompatibleTypes(node.resultdef, def);
- datadef:=getarraydef(cansichartype,1);
+ datadef:=carraydef.getreusable(cansichartype,1);
end;
ftcb.finish_internal_data_builder(datatcb,ll,datadef,varalign);
{ we now emit the address of the first element of the array
@@ -876,7 +876,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
datatcb:=ctai_typedconstbuilder.create([tcalo_is_lab,tcalo_make_dead_strippable]);
pw:=pcompilerwidestring(tstringconstnode(node).value_str);
{ include terminating #0 }
- datadef:=getarraydef(cwidechartype,tstringconstnode(node).len+1);
+ datadef:=carraydef.getreusable(cwidechartype,tstringconstnode(node).len+1);
datatcb.maybe_begin_aggregate(datadef);
for i:=0 to tstringconstnode(node).len-1 do
datatcb.emit_tai(Tai_const.Create_16bit(pw^.data[i]),cwidechartype);