mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 01:29:19 +02:00
- removed ttypedconstkind parameter from tai_simpletypedconst constructor,
as it always has to be tck_simple anyway git-svn-id: trunk@41975 -
This commit is contained in:
parent
ae5a9e033a
commit
97a144ea6a
@ -57,7 +57,7 @@ type
|
|||||||
protected
|
protected
|
||||||
fval: tai;
|
fval: tai;
|
||||||
public
|
public
|
||||||
constructor create(_adetyp: ttypedconstkind; _def: tdef; _val: tai);
|
constructor create(_def: tdef; _val: tai);
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
property val: tai read fval write setval;
|
property val: tai read fval write setval;
|
||||||
end;
|
end;
|
||||||
@ -640,9 +640,9 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tai_simpletypedconst.create(_adetyp: ttypedconstkind; _def: tdef; _val: tai);
|
constructor tai_simpletypedconst.create(_def: tdef; _val: tai);
|
||||||
begin
|
begin
|
||||||
inherited create(_adetyp,_def);
|
inherited create(tck_simple,_def);
|
||||||
fval:=_val;
|
fval:=_val;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -710,7 +710,7 @@ implementation
|
|||||||
{ the "nil" def will be replaced with an array def of the appropriate
|
{ the "nil" def will be replaced with an array def of the appropriate
|
||||||
size once we're finished adding data, so we don't create intermediate
|
size once we're finished adding data, so we don't create intermediate
|
||||||
arraydefs all the time }
|
arraydefs all the time }
|
||||||
fvalues.add(tai_simpletypedconst.create(tck_simple,nil,newstr));
|
fvalues.add(tai_simpletypedconst.create(nil,newstr));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tai_aggregatetypedconst.add_to_string(strtai: tai_string; othertai: tai);
|
procedure tai_aggregatetypedconst.add_to_string(strtai: tai_string; othertai: tai);
|
||||||
|
@ -370,7 +370,7 @@ implementation
|
|||||||
symdef:=cpointerdef.getreusable(symdef);
|
symdef:=cpointerdef.getreusable(symdef);
|
||||||
if not equal_llvm_defs(symdef,p.def) then
|
if not equal_llvm_defs(symdef,p.def) then
|
||||||
begin
|
begin
|
||||||
cnv:=taillvm.op_reg_tai_size(la_bitcast,NR_NO,tai_simpletypedconst.create(tck_simple,symdef,tai_simpletypedconst(p).val),p.def);
|
cnv:=taillvm.op_reg_tai_size(la_bitcast,NR_NO,tai_simpletypedconst.create(symdef,tai_simpletypedconst(p).val),p.def);
|
||||||
tai_simpletypedconst(p).val:=cnv;
|
tai_simpletypedconst(p).val:=cnv;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -169,7 +169,7 @@ implementation
|
|||||||
if d<>def then
|
if d<>def then
|
||||||
internalerror(2015091002);
|
internalerror(2015091002);
|
||||||
oldconst:=agginfo.aggai.replacevalueatpos(
|
oldconst:=agginfo.aggai.replacevalueatpos(
|
||||||
tai_simpletypedconst.create(tck_simple,d,ai),pos
|
tai_simpletypedconst.create(d,ai),pos
|
||||||
);
|
);
|
||||||
oldconst.free;
|
oldconst.free;
|
||||||
end;
|
end;
|
||||||
@ -256,7 +256,7 @@ implementation
|
|||||||
|
|
||||||
function tllvmtai_typedconstbuilder.wrap_with_type(p: tai; def: tdef): tai;
|
function tllvmtai_typedconstbuilder.wrap_with_type(p: tai; def: tdef): tai;
|
||||||
begin
|
begin
|
||||||
result:=tai_simpletypedconst.create(tck_simple,def,p);
|
result:=tai_simpletypedconst.create(def,p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
kind:=tck_simple;
|
kind:=tck_simple;
|
||||||
{ finalise the queued expression }
|
{ finalise the queued expression }
|
||||||
ai:=tai_simpletypedconst.create(kind,def,p);
|
ai:=tai_simpletypedconst.create(def,p);
|
||||||
{ set the new index to -1, so we internalerror should we try to
|
{ set the new index to -1, so we internalerror should we try to
|
||||||
add anything further }
|
add anything further }
|
||||||
update_queued_tai(def,ai,ai,-1);
|
update_queued_tai(def,ai,ai,-1);
|
||||||
@ -304,7 +304,7 @@ implementation
|
|||||||
fqueued_tai:=nil;
|
fqueued_tai:=nil;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
stc:=tai_simpletypedconst.create(tck_simple,def,p);
|
stc:=tai_simpletypedconst.create(def,p);
|
||||||
info:=tllvmaggregateinformation(curagginfo);
|
info:=tllvmaggregateinformation(curagginfo);
|
||||||
{ these elements can be aggregates themselves, e.g. a shortstring can
|
{ these elements can be aggregates themselves, e.g. a shortstring can
|
||||||
be emitted as a series of bytes and string data arrays }
|
be emitted as a series of bytes and string data arrays }
|
||||||
@ -358,7 +358,7 @@ implementation
|
|||||||
fillbytes:=info.prepare_next_field(def);
|
fillbytes:=info.prepare_next_field(def);
|
||||||
while fillbytes>0 do
|
while fillbytes>0 do
|
||||||
begin
|
begin
|
||||||
info.aggai.insertvaluebeforepos(tai_simpletypedconst.create(tck_simple,u8inttype,tai_const.create_8bit(0)),info.anonrecalignpos);
|
info.aggai.insertvaluebeforepos(tai_simpletypedconst.create(u8inttype,tai_const.create_8bit(0)),info.anonrecalignpos);
|
||||||
dec(fillbytes);
|
dec(fillbytes);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user