mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 14:48:18 +02:00
* moved nf_typedaddr to addrnodeflags (anf_typedaddr)
git-svn-id: trunk@38671 -
This commit is contained in:
parent
213e61eae5
commit
3318703ece
@ -58,7 +58,7 @@ implementation
|
||||
|
||||
procedure ti386addrnode.set_absvarsym_resultdef;
|
||||
begin
|
||||
if not(nf_typedaddr in flags) then
|
||||
if not(anf_typedaddr in addrnodeflags) then
|
||||
resultdef:=voidnearfspointertype
|
||||
else
|
||||
resultdef:=tcpupointerdefclass(cpointerdef).createx86(left.resultdef,x86pt_near_fs);
|
||||
|
@ -70,7 +70,7 @@ implementation
|
||||
|
||||
procedure ti8086addrnode.set_absvarsym_resultdef;
|
||||
begin
|
||||
if not(nf_typedaddr in flags) then
|
||||
if not(anf_typedaddr in addrnodeflags) then
|
||||
resultdef:=voidfarpointertype
|
||||
else
|
||||
resultdef:=tcpupointerdefclass(cpointerdef).createx86(left.resultdef,x86pt_far);
|
||||
|
@ -170,14 +170,14 @@ interface
|
||||
is_emptyset(left)) then
|
||||
begin
|
||||
left:=caddrnode.create_internal(left);
|
||||
include(left.flags,nf_typedaddr);
|
||||
include(taddrnode(left).addrnodeflags,anf_typedaddr);
|
||||
if isenum then
|
||||
begin
|
||||
inserttypeconv_explicit(left,java_juenumset);
|
||||
if right.resultdef.typ=setdef then
|
||||
begin
|
||||
right:=caddrnode.create_internal(right);
|
||||
include(right.flags,nf_typedaddr);
|
||||
include(taddrnode(right).addrnodeflags,anf_typedaddr);
|
||||
inserttypeconv_explicit(right,java_juenumset);
|
||||
end;
|
||||
end
|
||||
@ -187,7 +187,7 @@ interface
|
||||
if right.resultdef.typ=setdef then
|
||||
begin
|
||||
right:=caddrnode.create_internal(right);
|
||||
include(right.flags,nf_typedaddr);
|
||||
include(taddrnode(right).addrnodeflags,anf_typedaddr);
|
||||
inserttypeconv_explicit(right,java_jubitset);
|
||||
end;
|
||||
end;
|
||||
|
@ -267,7 +267,7 @@ implementation
|
||||
begin
|
||||
{ pass pointer to the struct }
|
||||
left:=caddrnode.create_internal(left);
|
||||
include(left.flags,nf_typedaddr);
|
||||
include(taddrnode(left).addrnodeflags,anf_typedaddr);
|
||||
typecheckpass(left);
|
||||
end;
|
||||
{ wrap the primitive type in an object container
|
||||
@ -551,7 +551,7 @@ implementation
|
||||
if not tprocvardef(right.resultdef).is_addressonly then
|
||||
begin
|
||||
right:=caddrnode.create_internal(right);
|
||||
include(right.flags,nf_typedaddr);
|
||||
include(taddrnode(right).addrnodeflags,anf_typedaddr);
|
||||
end;
|
||||
right:=ctypeconvnode.create_explicit(right,pdclass);
|
||||
include(right.flags,nf_load_procvar);
|
||||
|
@ -374,7 +374,7 @@ implementation
|
||||
setclassdef:=java_juenumset;
|
||||
end;
|
||||
left:=caddrnode.create_internal(left);
|
||||
include(left.flags,nf_typedaddr);
|
||||
include(taddrnode(left).addrnodeflags,anf_typedaddr);
|
||||
inserttypeconv_explicit(left,setclassdef);
|
||||
result:=ccallnode.createinternmethod(
|
||||
cloadvmtaddrnode.create(ctypenode.create(setclassdef)),
|
||||
|
@ -366,7 +366,7 @@ implementation
|
||||
tcallparanode(left).right:=nil;
|
||||
seteledef:=tsetdef(setpara.resultdef).elementdef;
|
||||
setpara:=caddrnode.create_internal(setpara);
|
||||
include(setpara.flags,nf_typedaddr);
|
||||
include(taddrnode(setpara).addrnodeflags,anf_typedaddr);
|
||||
if seteledef.typ=enumdef then
|
||||
begin
|
||||
inserttypeconv_explicit(setpara,java_juenumset);
|
||||
|
@ -132,7 +132,7 @@ function tjvmassignmentnode.pass_1: tnode;
|
||||
{ call ShortstringClass(@shortstring).setChar(index,char) }
|
||||
tvecnode(target).left:=caddrnode.create_internal(tvecnode(target).left);
|
||||
{ avoid useless typecheck when casting to shortstringclass }
|
||||
include(tvecnode(target).left.flags,nf_typedaddr);
|
||||
include(taddrnode(tvecnode(target).left).addrnodeflags,anf_typedaddr);
|
||||
inserttypeconv_explicit(tvecnode(target).left,java_shortstring);
|
||||
psym:=search_struct_member(tabstractrecorddef(java_shortstring),'SETCHAR');
|
||||
if not assigned(psym) or
|
||||
|
@ -383,7 +383,7 @@ implementation
|
||||
stringclass:=java_shortstring;
|
||||
left:=caddrnode.create_internal(left);
|
||||
{ avoid useless typecheck when casting to shortstringclass }
|
||||
include(left.flags,nf_typedaddr);
|
||||
include(taddrnode(left).addrnodeflags,anf_typedaddr);
|
||||
end
|
||||
else
|
||||
internalerror(2011052407);
|
||||
|
@ -84,7 +84,7 @@ implementation
|
||||
exit;
|
||||
{ otherwise call set helper }
|
||||
right:=caddrnode.create_internal(right);
|
||||
include(right.flags,nf_typedaddr);
|
||||
include(taddrnode(right).addrnodeflags,anf_typedaddr);
|
||||
if isenum then
|
||||
begin
|
||||
inserttypeconv_explicit(left,java_jlenum);
|
||||
|
@ -125,7 +125,7 @@ implementation
|
||||
if jvmimplicitpointertype(p.resultdef) then
|
||||
begin
|
||||
p:=caddrnode.create(p);
|
||||
include(p.flags,nf_typedaddr);
|
||||
include(taddrnode(p).addrnodeflags,anf_typedaddr);
|
||||
end;
|
||||
paras:=ccallparanode.create(ctypeconvnode.create_explicit(p,
|
||||
search_system_type('TJOBJECTARRAY').typedef),nil);
|
||||
|
@ -4840,7 +4840,7 @@ implementation
|
||||
if tabstractvarsym(para.parasym).varspez=vs_const then
|
||||
tempnode.includetempflag(ti_const);
|
||||
paraaddr:=caddrnode.create_internal(para.left);
|
||||
include(paraaddr.flags,nf_typedaddr);
|
||||
include(paraaddr.addrnodeflags,anf_typedaddr);
|
||||
addstatement(inlineinitstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
|
||||
paraaddr));
|
||||
para.left:=cderefnode.create(ctemprefnode.create(tempnode));
|
||||
|
@ -129,7 +129,7 @@ implementation
|
||||
if not assigned(left) then
|
||||
begin
|
||||
left:=caddrnode.create_internal(cloadnode.create(tprocdef(symtableentry.owner.defowner).parentfpstruct,tprocdef(symtableentry.owner.defowner).parentfpstruct.owner));
|
||||
include(left.flags,nf_typedaddr);
|
||||
include(taddrnode(left).addrnodeflags,anf_typedaddr);
|
||||
end;
|
||||
typecheckpass(left);
|
||||
end;
|
||||
|
@ -109,7 +109,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
result:=caddrnode.create_internal(cloadnode.create(current_procinfo.procdef.parentfpstruct,current_procinfo.procdef.parentfpstruct.owner));
|
||||
include(result.flags,nf_typedaddr);
|
||||
include(taddrnode(result).addrnodeflags,anf_typedaddr);
|
||||
currpi:=current_procinfo;
|
||||
end;
|
||||
{ follow the chain of parentfpstructs until we arrive at the one we
|
||||
|
@ -2419,7 +2419,7 @@ implementation
|
||||
begin
|
||||
left.resultdef:=resultdef;
|
||||
if (nf_explicit in flags) and (left.nodetype = addrn) then
|
||||
include(left.flags, nf_typedaddr);
|
||||
include(taddrnode(left).addrnodeflags,anf_typedaddr);
|
||||
result:=left;
|
||||
left:=nil;
|
||||
end;
|
||||
|
@ -70,7 +70,8 @@ interface
|
||||
|
||||
taddrnodeflag = (
|
||||
{ generated by the Ofs() internal function }
|
||||
anf_ofs
|
||||
anf_ofs,
|
||||
anf_typedaddr
|
||||
);
|
||||
taddrnodeflags = set of taddrnodeflag;
|
||||
|
||||
@ -682,7 +683,7 @@ implementation
|
||||
inc(offset,hsym.fieldoffset);
|
||||
hp:=tunarynode(hp).left;
|
||||
end;
|
||||
if nf_typedaddr in flags then
|
||||
if anf_typedaddr in addrnodeflags then
|
||||
res:=cpointerconstnode.create(offset,cpointerdef.getreusable(left.resultdef))
|
||||
else
|
||||
res:=cpointerconstnode.create(offset,voidpointertype);
|
||||
@ -691,7 +692,7 @@ implementation
|
||||
else if (nf_internal in flags) or
|
||||
valid_for_addr(left,true) then
|
||||
begin
|
||||
if not(nf_typedaddr in flags) then
|
||||
if not(anf_typedaddr in addrnodeflags) then
|
||||
resultdef:=voidpointertype
|
||||
else
|
||||
resultdef:=cpointerdef.getreusable(left.resultdef);
|
||||
@ -1341,7 +1342,8 @@ implementation
|
||||
function is_big_untyped_addrnode(p: tnode): boolean;
|
||||
begin
|
||||
is_big_untyped_addrnode:=(p.nodetype=addrn) and
|
||||
not (nf_typedaddr in p.flags) and (taddrnode(p).left.resultdef.size > 1);
|
||||
not (anf_typedaddr in taddrnode(p).addrnodeflags) and
|
||||
(taddrnode(p).left.resultdef.size > 1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -229,9 +229,6 @@ interface
|
||||
during simplify, the flag must be moved to another node }
|
||||
nf_usercode_entry,
|
||||
|
||||
{ taddrnode }
|
||||
nf_typedaddr,
|
||||
|
||||
{ tderefnode }
|
||||
nf_no_checkpointer,
|
||||
|
||||
@ -277,7 +274,7 @@ interface
|
||||
{ tloadvmtaddrnode }
|
||||
nf_ignore_for_wpo { we know that this loadvmtaddrnode cannot be used to construct a class instance }
|
||||
|
||||
{ WARNING: there are now 32 elements in this type, and a set of this
|
||||
{ WARNING: there are now 31 elements in this type, and a set of this
|
||||
type is written to the PPU. So before adding more than 32 elements,
|
||||
either move some flags to specific nodes, or stream a normalset
|
||||
to the ppu
|
||||
|
@ -325,7 +325,7 @@ begin
|
||||
if is_shortstr then
|
||||
begin
|
||||
sn:=caddrnode.create(sn);
|
||||
include(sn.flags,nf_typedaddr);
|
||||
include(taddrnode(sn).addrnodeflags,anf_typedaddr);
|
||||
include(sn.flags,nf_internal);
|
||||
end;
|
||||
arrp:=carrayconstructornode.create(sn,arrp);
|
||||
|
@ -3780,7 +3780,7 @@ implementation
|
||||
p1:=caddrnode.create(p1);
|
||||
p1.fileinfo:=filepos;
|
||||
if cs_typed_addresses in current_settings.localswitches then
|
||||
include(p1.flags,nf_typedaddr);
|
||||
include(taddrnode(p1).addrnodeflags,anf_typedaddr);
|
||||
{ Store the procvar that we are expecting, the
|
||||
addrn will use the information to find the correct
|
||||
procdef or it will return an error }
|
||||
|
@ -683,7 +683,7 @@ implementation
|
||||
if not hasimplicitderef then
|
||||
begin
|
||||
valuenode:=caddrnode.create_internal_nomark(valuenode);
|
||||
include(valuenode.flags,nf_typedaddr);
|
||||
include(taddrnode(valuenode).addrnodeflags,anf_typedaddr);
|
||||
refnode:=cderefnode.create(refnode);
|
||||
fillchar(refnode.fileinfo,sizeof(tfileposinfo),0);
|
||||
end;
|
||||
|
@ -1328,7 +1328,7 @@ implementation
|
||||
if addrparam then
|
||||
begin
|
||||
initcode:=caddrnode.create_internal(initcode);
|
||||
include(initcode.flags,nf_typedaddr);
|
||||
include(taddrnode(initcode).addrnodeflags,anf_typedaddr);
|
||||
end;
|
||||
initcode:=cassignmentnode.create(
|
||||
csubscriptnode.create(result,cloadnode.create(pd.parentfpstruct,pd.parentfpstruct.owner)),
|
||||
|
Loading…
Reference in New Issue
Block a user