* made vararrays working on win64

git-svn-id: trunk@6515 -
This commit is contained in:
florian 2007-02-16 20:12:34 +00:00
parent 34bdb90822
commit 3aa64eb6b4
2 changed files with 9 additions and 9 deletions

View File

@ -1821,7 +1821,7 @@ implementation
{ get temp for array of indicies, { get temp for array of indicies,
we set the real size later } we set the real size later }
temp:=ctempcreatenode.create(sinttype,4,tt_persistent,false); temp:=ctempcreatenode.create(s32inttype,4,tt_persistent,false);
addstatement(newstatement,temp); addstatement(newstatement,temp);
countindices:=0; countindices:=0;
@ -1829,12 +1829,12 @@ implementation
p4:=comp_expr(true); p4:=comp_expr(true);
addstatement(newstatement,cassignmentnode.create( addstatement(newstatement,cassignmentnode.create(
ctemprefnode.create_offset(temp,countindices*sinttype.size),p4)); ctemprefnode.create_offset(temp,countindices*s32inttype.size),p4));
inc(countindices); inc(countindices);
until not try_to_consume(_COMMA); until not try_to_consume(_COMMA);
{ set real size } { set real size }
temp.size:=countindices*sinttype.size; temp.size:=countindices*s32inttype.size;
consume(_RECKKLAMMER); consume(_RECKKLAMMER);
@ -1846,7 +1846,7 @@ implementation
{ create call to fpc_vararray_put } { create call to fpc_vararray_put }
paras:=ccallparanode.create(cordconstnode.create paras:=ccallparanode.create(cordconstnode.create
(countindices,sinttype,true), (countindices,s32inttype,true),
ccallparanode.create(caddrnode.create_internal ccallparanode.create(caddrnode.create_internal
(ctemprefnode.create(temp)), (ctemprefnode.create(temp)),
ccallparanode.create(ctypeconvnode.create_internal(p4,cvarianttype), ccallparanode.create(ctypeconvnode.create_internal(p4,cvarianttype),
@ -1864,7 +1864,7 @@ implementation
{ create call to fpc_vararray_get } { create call to fpc_vararray_get }
paras:=ccallparanode.create(cordconstnode.create paras:=ccallparanode.create(cordconstnode.create
(countindices,sinttype,true), (countindices,s32inttype,true),
ccallparanode.create(caddrnode.create_internal ccallparanode.create(caddrnode.create_internal
(ctemprefnode.create(temp)), (ctemprefnode.create(temp)),
ccallparanode.create(p1, ccallparanode.create(p1,

View File

@ -55,16 +55,16 @@ type
pvararraybound = ^tvararraybound; pvararraybound = ^tvararraybound;
pvararray = ^tvararray; pvararray = ^tvararray;
tvararraybound = packed record tvararraybound = record
elementcount,lowbound : longint; elementcount,lowbound : longint;
end; end;
tvararrayboundarray = array[0..0] of tvararraybound; tvararrayboundarray = array[0..0] of tvararraybound;
tvararraycoorarray = array[0..0] of SizeInt; tvararraycoorarray = array[0..0] of Longint;
tvararray = packed record tvararray = record
dimcount,flags : word; dimcount,flags : word;
elementsize : ptrint; elementsize : longint;
lockcount : longint; lockcount : longint;
data : pointer; data : pointer;
bounds : tvararrayboundarray; bounds : tvararrayboundarray;