- remmoved doregister parameter from t*sym constructors, as the registration

is handled automatically nowadays

git-svn-id: trunk@42998 -
This commit is contained in:
Jonas Maebe 2019-09-14 17:30:45 +00:00
parent d14fd51d0b
commit a051b8d225
20 changed files with 113 additions and 114 deletions

View File

@ -174,7 +174,7 @@ implementation
{ find the type of the descriptor structure }
descriptordef:=search_named_unit_globaltype('BLOCKRTL','FPC_BLOCK_DESCRIPTOR_SIMPLE',true).typedef;
{ create new static variable }
descriptor:=cstaticvarsym.create(name,vs_value,descriptordef,[],true);
descriptor:=cstaticvarsym.create(name,vs_value,descriptordef,[]);
symtablestack.top.insert(descriptor);
include(descriptor.symoptions,sp_internal);
{ create typed constant for the descriptor }
@ -227,7 +227,7 @@ implementation
begin
{ alias for the type to invoke the procvar, used in the symcreat
handling of tsk_block_invoke_procvar }
result.localst.insert(ctypesym.create('__FPC_BLOCK_INVOKE_PV_TYPE',orgpv,true));
result.localst.insert(ctypesym.create('__FPC_BLOCK_INVOKE_PV_TYPE',orgpv));
result.synthetickind:=tsk_block_invoke_procvar;
end;
end;
@ -253,7 +253,7 @@ implementation
result:=cstaticvarsym.create(
'$'+literalname,
vs_value,
blockliteraldef,[],true);
blockliteraldef,[]);
include(result.symoptions,sp_internal);
symtablestack.top.insert(result);
{ initialise it }

View File

@ -213,7 +213,7 @@ implementation
begin
vs:=cstaticvarsym.create(sym.realname+'$threadvar',sym.varspez,
jvmgetthreadvardef(sym.vardef),
sym.varoptions - [vo_is_thread_var],true);
sym.varoptions - [vo_is_thread_var]);
sym.owner.insert(vs);
{ make sure that the new sym does not get allocated (we will allocate
it when encountering the original sym, because only then we know

View File

@ -176,11 +176,11 @@ implementation
name that can be used in generated Pascal code without risking an
identifier conflict (since it is local to this class; the global name
is unique because it's an identifier that contains $-signs) }
enumclass.symtable.insert(ctypesym.create('__FPC_TEnumClassAlias',enumclass,true));
enumclass.symtable.insert(ctypesym.create('__FPC_TEnumClassAlias',enumclass));
{ also create an alias for the enum type so that we can iterate over
all enum values when creating the body of the class constructor }
temptypesym:=ctypesym.create('__FPC_TEnumAlias',nil,true);
temptypesym:=ctypesym.create('__FPC_TEnumAlias',nil);
{ don't pass def to the ttypesym constructor, because then it
will replace the current (real) typesym of that def with the alias }
temptypesym.typedef:=def;
@ -212,14 +212,14 @@ implementation
{ create static fields representing all enums }
for i:=0 to tenumdef(def).symtable.symlist.count-1 do
begin
fsym:=cfieldvarsym.create(tenumsym(tenumdef(def).symtable.symlist[i]).realname,vs_final,enumclass,[],true);
fsym:=cfieldvarsym.create(tenumsym(tenumdef(def).symtable.symlist[i]).realname,vs_final,enumclass,[]);
enumclass.symtable.insert(fsym);
sym:=make_field_static(enumclass.symtable,fsym);
{ add alias for the field representing ordinal(0), for use in
initialization code }
if tenumsym(tenumdef(def).symtable.symlist[i]).value=0 then
begin
aliassym:=cstaticvarsym.create('__FPC_Zero_Initializer',vs_final,enumclass,[vo_is_external],true);
aliassym:=cstaticvarsym.create('__FPC_Zero_Initializer',vs_final,enumclass,[vo_is_external]);
enumclass.symtable.insert(aliassym);
aliassym.set_raw_mangledname(sym.mangledname);
end;
@ -228,7 +228,7 @@ implementation
(used internally by the JDK) }
arrdef:=carraydef.create(0,tenumdef(def).symtable.symlist.count-1,s32inttype);
arrdef.elementdef:=enumclass;
arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef,true);
arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef);
enumclass.symtable.insert(arrsym);
{ insert "public static values: array of enumclass" that returns $VALUES.clone()
(rather than a dynamic array and using clone --which we don't support yet for arrays--
@ -242,12 +242,12 @@ implementation
if tenumdef(def).has_jumps then
begin
{ add field for the value }
fsym:=cfieldvarsym.create('__fpc_fenumval',vs_final,s32inttype,[],true);
fsym:=cfieldvarsym.create('__fpc_fenumval',vs_final,s32inttype,[]);
enumclass.symtable.insert(fsym);
tobjectsymtable(enumclass.symtable).addfield(fsym,vis_strictprivate);
{ add class field with hash table that maps from FPC-declared ordinal value -> enum instance }
juhashmap:=search_system_type('JUHASHMAP').typedef;
fsym:=cfieldvarsym.create('__fpc_ord2enum',vs_final,juhashmap,[],true);
fsym:=cfieldvarsym.create('__fpc_ord2enum',vs_final,juhashmap,[]);
enumclass.symtable.insert(fsym);
make_field_static(enumclass.symtable,fsym);
{ add custom constructor }
@ -304,7 +304,7 @@ implementation
"Values" instance method -- that's also the reason why we insert the
field only now, because we cannot disable duplicate identifier
checking when creating the "Values" method }
fsym:=cfieldvarsym.create('$VALUES',vs_final,arrdef,[],true);
fsym:=cfieldvarsym.create('$VALUES',vs_final,arrdef,[]);
fsym.visibility:=vis_strictprivate;
enumclass.symtable.insert(fsym,false);
sym:=make_field_static(enumclass.symtable,fsym);
@ -360,7 +360,7 @@ implementation
if df_generic in def.defoptions then
include(pvclass.defoptions,df_generic);
{ associate typesym }
pvclass.symtable.insert(ctypesym.create('__FPC_TProcVarClassAlias',pvclass,true));
pvclass.symtable.insert(ctypesym.create('__FPC_TProcVarClassAlias',pvclass));
{ set external name to match procvar type name }
if not islocal then
pvclass.objextname:=stringdup(name)
@ -381,7 +381,7 @@ implementation
{ add local alias for the procvartype that we can use when implementing
the invoke method }
temptypesym:=ctypesym.create('__FPC_ProcVarAlias',nil,true);
temptypesym:=ctypesym.create('__FPC_ProcVarAlias',nil);
{ don't pass def to the ttypesym constructor, because then it
will replace the current (real) typesym of that def with the alias }
temptypesym.typedef:=def;
@ -402,7 +402,7 @@ implementation
if df_generic in def.defoptions then
include(pvintf.defoptions,df_generic);
{ associate typesym }
pvclass.symtable.insert(ctypesym.create('Callback',pvintf,true));
pvclass.symtable.insert(ctypesym.create('Callback',pvintf));
{ add a method prototype matching the procvar (like the invoke
in the procvarclass itself) }
@ -511,7 +511,7 @@ implementation
jvm_create_procvar_class_intern('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv,true);
{ create alias for the procvar type so we can use it in generated
Pascal code }
typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv,true);
typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv);
wrapperpv.classdef.typesym.visibility:=vis_strictprivate;
symtablestack.top.insert(typ);
symtablestack.pop(pd.owner);
@ -600,7 +600,7 @@ implementation
begin
{ make sure we don't emit a definition for this field (we'll do
that for the constsym already) -> mark as external }
ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,csym.constdef,[vo_is_external],true);
ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,csym.constdef,[vo_is_external]);
csym.owner.insert(ssym);
{ alias storage to the constsym }
ssym.set_mangledname(csym.realname);
@ -638,7 +638,7 @@ implementation
has been compiler -> insert a copy in the unit's staticsymtable
}
symtablestack.push(current_module.localsymtable);
ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,tsetdef(csym.constdef).getcopy,[vo_is_external,vo_has_local_copy],true);
ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,tsetdef(csym.constdef).getcopy,[vo_is_external,vo_has_local_copy]);
symtablestack.top.insert(ssym);
symtablestack.pop(current_module.localsymtable);
{ alias storage to the constsym }

View File

@ -587,8 +587,7 @@ implementation
-> must have unique name in entire progream }
calldescsym:=cstaticvarsym.create(
internaltypeprefixName[itp_vardisp_calldesc]+current_module.modulename^+'$'+tostr(current_module.localsymtable.SymList.count),
vs_const,tcb.end_anonymous_record,[vo_is_public,vo_is_typed_const],
false);
vs_const,tcb.end_anonymous_record,[vo_is_public,vo_is_typed_const]);
calldescsym.varstate:=vs_initialised;
current_module.localsymtable.insert(calldescsym);
current_asmdata.AsmLists[al_typedconsts].concatList(

View File

@ -456,7 +456,7 @@ implementation
if not assigned(srsym) then
begin
{ no valid default variable found, so create it }
srsym:=clocalvarsym.create(defaultname,vs_const,def,[],true);
srsym:=clocalvarsym.create(defaultname,vs_const,def,[]);
srsymtable.insert(srsym);
{ mark the staticvarsym as typedconst }
include(tabstractvarsym(srsym).varoptions,vo_is_typed_const);

View File

@ -285,13 +285,13 @@ implementation
{ note: we keep hdef so that we might at least read the
constant data correctly for error recovery }
check_allowed_for_var_or_const(hdef,false);
sym:=cfieldvarsym.create(orgname,varspez,hdef,[],true);
sym:=cfieldvarsym.create(orgname,varspez,hdef,[]);
symtablestack.top.insert(sym);
sym:=make_field_static(symtablestack.top,tfieldvarsym(sym));
end
else
begin
sym:=cstaticvarsym.create(orgname,varspez,hdef,[],true);
sym:=cstaticvarsym.create(orgname,varspez,hdef,[]);
sym.visibility:=symtablestack.top.currentvisibility;
symtablestack.top.insert(sym);
end;
@ -374,12 +374,12 @@ implementation
begin
if symtablestack.top.symtabletype=localsymtable then
begin
labelsym.jumpbuf:=clocalvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[],true);
labelsym.jumpbuf:=clocalvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
symtablestack.top.insert(labelsym.jumpbuf);
end
else
begin
labelsym.jumpbuf:=cstaticvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[],true);
labelsym.jumpbuf:=cstaticvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
symtablestack.top.insert(labelsym.jumpbuf);
cnodeutils.insertbssdata(tstaticvarsym(labelsym.jumpbuf));
end;
@ -826,7 +826,7 @@ implementation
sym:=tsym(symtablestack.top.Find(typename));
if not assigned(sym) then
begin
sym:=ctypesym.create(orgtypename,cundefineddef.create(true),true);
sym:=ctypesym.create(orgtypename,cundefineddef.create(true));
Include(sym.symoptions,sp_generic_dummy);
ttypesym(sym).typedef.typesym:=sym;
sym.visibility:=symtablestack.top.currentvisibility;
@ -867,7 +867,7 @@ implementation
{ insert a new type if we don't reuse an existing symbol }
if not assigned(newtype) then
begin
newtype:=ctypesym.create(genorgtypename,hdef,true);
newtype:=ctypesym.create(genorgtypename,hdef);
newtype.visibility:=symtablestack.top.currentvisibility;
symtablestack.top.insert(newtype);
end;

View File

@ -350,7 +350,7 @@ implementation
{ possible proc directives }
if check_proc_directive(true) then
begin
dummytype:=ctypesym.create('unnamed',hdef,true);
dummytype:=ctypesym.create('unnamed',hdef);
parse_var_proc_directives(tsym(dummytype));
dummytype.typedef:=nil;
hdef.typesym:=nil;
@ -1144,7 +1144,7 @@ implementation
end;
if not assigned(dummysym) then
begin
dummysym:=ctypesym.create(orgspnongen,cundefineddef.create(true),true);
dummysym:=ctypesym.create(orgspnongen,cundefineddef.create(true));
if assigned(astruct) then
astruct.symtable.insert(dummysym)
else

View File

@ -877,7 +877,7 @@ implementation
(def.typesym=nil) and
check_proc_directive(true) then
begin
newtype:=ctypesym.create('unnamed',def,true);
newtype:=ctypesym.create('unnamed',def);
parse_var_proc_directives(tsym(newtype));
newtype.typedef:=nil;
def.typesym:=nil;
@ -1115,7 +1115,7 @@ implementation
case vs.typ of
localvarsym :
begin
tcsym:=cstaticvarsym.create('$default'+vs.realname,vs_const,vs.vardef,[],true);
tcsym:=cstaticvarsym.create('$default'+vs.realname,vs_const,vs.vardef,[]);
include(tcsym.symoptions,sp_internal);
symtablestack.top.insert(tcsym);
templist:=tasmlist.create;
@ -1362,11 +1362,11 @@ implementation
(idtoken=_GENERIC);
case symtablestack.top.symtabletype of
localsymtable :
vs:=clocalvarsym.create(orgpattern,vs_value,generrordef,[],false);
vs:=clocalvarsym.create(orgpattern,vs_value,generrordef,[]);
staticsymtable,
globalsymtable :
begin
vs:=cstaticvarsym.create(orgpattern,vs_value,generrordef,[],false);
vs:=cstaticvarsym.create(orgpattern,vs_value,generrordef,[]);
if vd_threadvar in options then
include(vs.varoptions,vo_is_thread_var);
end;
@ -1661,7 +1661,7 @@ implementation
sorg:=orgpattern;
if token=_ID then
begin
vs:=cfieldvarsym.create(sorg,vs_value,generrordef,[],false);
vs:=cfieldvarsym.create(sorg,vs_value,generrordef,[]);
{ normally the visibility is set via addfield, but sometimes
we collect symbols so we can add them in a batch of
@ -1881,7 +1881,7 @@ implementation
begin
consume(_ID);
consume(_COLON);
fieldvs:=cfieldvarsym.create(sorg,vs_value,generrordef,[],true);
fieldvs:=cfieldvarsym.create(sorg,vs_value,generrordef,[]);
variantdesc^^.variantselector:=fieldvs;
symtablestack.top.insert(fieldvs);
end;

View File

@ -344,7 +344,7 @@ implementation
exit_procinfo.nestedexitlabel.defined:=true;
exit_procinfo.nestedexitlabel.used:=true;
exit_procinfo.nestedexitlabel.jumpbuf:=clocalvarsym.create('LABEL$_'+exit_procinfo.nestedexitlabel.name,vs_value,rec_jmp_buf,[],true);
exit_procinfo.nestedexitlabel.jumpbuf:=clocalvarsym.create('LABEL$_'+exit_procinfo.nestedexitlabel.name,vs_value,rec_jmp_buf,[]);
exit_procinfo.procdef.localst.insert(exit_procinfo.nestedexitlabel);
exit_procinfo.procdef.localst.insert(exit_procinfo.nestedexitlabel.jumpbuf);
end;
@ -3073,7 +3073,7 @@ implementation
findwithsymtable then
begin
{ create dummy symbol, it will be freed later on }
srsym:=tstoredsym.create(undefinedsym,'$undefinedsym',false);
srsym:=tstoredsym.create(undefinedsym,'$undefinedsym');
srsymtable:=nil;
end
else

View File

@ -972,7 +972,7 @@ uses
else
srsym:=cprocsym.create(finalspecializename)
else
srsym:=ctypesym.create(finalspecializename,generrordef,true);
srsym:=ctypesym.create(finalspecializename,generrordef);
{ insert the symbol only if we don't know already that we have
a procsym to add it to }
if not assigned(psym) then
@ -1218,7 +1218,7 @@ uses
repeat
if token=_ID then
begin
generictype:=ctypesym.create(orgpattern,cundefinedtype,false);
generictype:=ctypesym.create(orgpattern,cundefinedtype);
{ type parameters need to be added as strict private }
generictype.visibility:=vis_strictprivate;
include(generictype.symoptions,sp_generic_para);
@ -1417,7 +1417,7 @@ uses
generictype:=ttypesym(genericlist[i]);
if assigned(generictype.owner) then
begin
sym:=ctypesym.create(genericlist.nameofindex(i),generictype.typedef,true);
sym:=ctypesym.create(genericlist.nameofindex(i),generictype.typedef);
{ type parameters need to be added as strict private }
sym.visibility:=vis_strictprivate;
st.insert(sym);
@ -1464,7 +1464,7 @@ uses
begin
{ we need to pass nil as def here, because the constructor wants
to set the typesym of the def which is not what we want }
gensym:=ctypesym.create(copy(name,1,pos('$',name)-1),nil,true);
gensym:=ctypesym.create(copy(name,1,pos('$',name)-1),nil);
gensym.typedef:=current_structdef;
include(gensym.symoptions,sp_internal);
{ the symbol should be only visible to the generic class

View File

@ -192,7 +192,7 @@ implementation
assigned(hp.globalmacrosymtable) then
macrosymtablestack.push(hp.globalmacrosymtable);
{ insert unitsym }
unitsym:=cunitsym.create(hp.modulename^,hp,true);
unitsym:=cunitsym.create(hp.modulename^,hp);
inc(unitsym.refs);
tabstractunitsymtable(current_module.localsymtable).insertunit(unitsym);
if addasused then
@ -491,7 +491,7 @@ implementation
can not use the modulename because that can be different
when -Un is used }
current_tokenpos:=filepos;
unitsym:=cunitsym.create(sorg,nil,false);
unitsym:=cunitsym.create(sorg,nil);
{ the current module uses the unit hp2 }
current_module.addusedunit(hp2,true,unitsym);
end
@ -550,7 +550,7 @@ implementation
end;
{ update unitsym now that we have access to the full name }
pu.unitsym.free;
pu.unitsym:=cunitsym.create(sorg,pu.u,true);
pu.unitsym:=cunitsym.create(sorg,pu.u);
end
else
begin
@ -716,7 +716,7 @@ implementation
begin
{ insert symbol for got access in assembler code}
gotvarsym:=cstaticvarsym.create('_GLOBAL_OFFSET_TABLE_',
vs_value,voidpointertype,[vo_is_external],true);
vs_value,voidpointertype,[vo_is_external]);
gotvarsym.set_mangledname('_GLOBAL_OFFSET_TABLE_');
current_module.localsymtable.insert(gotvarsym);
{ avoid unnecessary warnings }
@ -827,7 +827,7 @@ implementation
include(def.objectoptions,oo_is_external);
include(def.objectoptions,oo_is_sealed);
def.objextname:=stringdup(current_module.realmodulename^);
typesym:=ctypesym.create('__FPC_JVM_Module_Class_Alias$',def,true);
typesym:=ctypesym.create('__FPC_JVM_Module_Class_Alias$',def);
symtablestack.top.insert(typesym);
end;
{$endif jvm}
@ -933,7 +933,7 @@ type
{ insert unitsym of this unit to prevent other units having
the same name }
tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module,true));
tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));
{ load default system unit, it must be loaded before interface is parsed
else we cannot use e.g. feature switches before the next real token }
@ -1705,7 +1705,7 @@ type
{Insert the name of the main program into the symbol table.}
if current_module.realmodulename^<>'' then
tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module,true));
tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));
Message1(parser_u_parsing_implementation,current_module.mainsource);
@ -2150,7 +2150,7 @@ type
{Insert the name of the main program into the symbol table.}
if current_module.realmodulename^<>'' then
tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module,true));
tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));
Message1(parser_u_parsing_implementation,current_module.mainsource);

View File

@ -316,7 +316,7 @@ implementation
if (df_generic in pd.defoptions) or
not paramanager.ret_in_param(pd.returndef,pd) then
begin
vs:=clocalvarsym.create('$result',vs_value,pd.returndef,[vo_is_funcret],true);
vs:=clocalvarsym.create('$result',vs_value,pd.returndef,[vo_is_funcret]);
pd.localst.insert(vs);
pd.funcretsym:=vs;
end;
@ -1104,7 +1104,7 @@ implementation
pnestedvarsdef:=cpointerdef.getreusable(nestedvarsdef);
if not(po_assembler in pd.procoptions) then
begin
nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[],true);
nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[]);
include(nestedvars.symoptions,sp_internal);
pd.localst.insert(nestedvars);
pd.parentfpstruct:=nestedvars;

View File

@ -943,7 +943,7 @@ implementation
begin
single_type(ot,[]);
check_type_valid(ot);
sym:=clocalvarsym.create(objrealname,vs_value,ot,[],true);
sym:=clocalvarsym.create(objrealname,vs_value,ot,[]);
end
else
begin
@ -976,7 +976,7 @@ implementation
{ create dummy symbol so we don't need a special
case in ncgflw, and so that we always know the
type }
sym:=clocalvarsym.create('$exceptsym',vs_value,ot,[],true);
sym:=clocalvarsym.create('$exceptsym',vs_value,ot,[]);
end;
excepTSymtable:=tstt_excepTSymtable.create;
excepTSymtable.insert(sym);

View File

@ -757,7 +757,7 @@ implementation
constructionsuccessful:=nil;
if is_class(procdef.struct) then
begin
constructionsuccessful:=clocalvarsym.create(internaltypeprefixName[itp_vmt_afterconstruction_local],vs_value,ptrsinttype,[],false);
constructionsuccessful:=clocalvarsym.create(internaltypeprefixName[itp_vmt_afterconstruction_local],vs_value,ptrsinttype,[]);
procdef.localst.insert(constructionsuccessful,false);
srsym:=search_struct_member(procdef.struct,'AFTERCONSTRUCTION');
if not assigned(srsym) or

View File

@ -224,7 +224,7 @@ implementation
function addtype(const s:string;def:tdef):ttypesym;
begin
result:=ctypesym.create(s,def,true);
result:=ctypesym.create(s,def);
systemunit.insert(result);
end;
@ -589,19 +589,19 @@ implementation
{ can't use addtype for pvmt because the rtti of the pointed
type is not available. The rtti for pvmt will be written implicitly
by thev tblarray below }
systemunit.insert(ctypesym.create('$pvmt',pvmttype,true));
addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[],true));
addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[],true));
addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[],true));
systemunit.insert(ctypesym.create('$pvmt',pvmttype));
addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[]));
addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[]));
addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[]));
{ it seems vmttype is used both for TP objects and Delphi classes,
so the next entry could either be the first virtual method (vm1)
(object) or the class name (class). We can't easily create separate
vtable formats for both, as gdb is hard coded to search for
__vtbl_ptr_type in all cases (JM) }
addfield(hrecst,cfieldvarsym.create('$vm1_or_classname',vs_value,cpointerdef.create(cshortstringtype),[],true));
addfield(hrecst,cfieldvarsym.create('$vm1_or_classname',vs_value,cpointerdef.create(cshortstringtype),[]));
vmtarraytype:=carraydef.create(0,0,s32inttype);
tarraydef(vmtarraytype).elementdef:=voidpointertype;
addfield(hrecst,cfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[],true));
addfield(hrecst,cfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
addtype('$__vtbl_ptr_type',vmttype);
vmtarraytype:=carraydef.create(0,1,s32inttype);
tarraydef(vmtarraytype).elementdef:=pvmttype;
@ -609,14 +609,14 @@ implementation
end;
{ Add a type for methodpointers }
hrecst:=trecordsymtable.create('',1,current_settings.alignment.recordalignmin);
addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[],true));
addfield(hrecst,cfieldvarsym.create('$self',vs_value,voidpointertype,[],true));
addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[]));
addfield(hrecst,cfieldvarsym.create('$self',vs_value,voidpointertype,[]));
methodpointertype:=crecorddef.create('',hrecst);
addtype('$methodpointer',methodpointertype);
{ Add a type for nested proc pointers }
hrecst:=trecordsymtable.create('',1,current_settings.alignment.recordalignmin);
addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[],true));
addfield(hrecst,cfieldvarsym.create('$parentfp',vs_value,parentfpvoidpointertype,[],true));
addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[]));
addfield(hrecst,cfieldvarsym.create('$parentfp',vs_value,parentfpvoidpointertype,[]));
nestedprocpointertype:=crecorddef.create('',hrecst);
addtype('$nestedprocpointer',nestedprocpointertype);
{$ifdef llvm}

View File

@ -1593,7 +1593,7 @@ implementation
begin
if check_proc_directive(true) then
begin
newtype:=ctypesym.create('unnamed',result,true);
newtype:=ctypesym.create('unnamed',result);
parse_var_proc_directives(tsym(newtype));
newtype.typedef:=nil;
result.typesym:=nil;

View File

@ -1272,7 +1272,7 @@ implementation
fieldvardef:=cpointerdef.getreusable(vardef)
else
fieldvardef:=vardef;
result:=cfieldvarsym.create(symrealname,vs_value,fieldvardef,[],true);
result:=cfieldvarsym.create(symrealname,vs_value,fieldvardef,[]);
if nestedvarsst.symlist.count=0 then
include(tfieldvarsym(result).varoptions,vo_is_first_field);
nestedvarsst.insert(result);

View File

@ -4819,7 +4819,7 @@ implementation
type again by name too -> create typesym }
if n<>'' then
begin
ts:=ctypesym.create(n,self,true);
ts:=ctypesym.create(n,self);
{ avoid hints about unused types (these may only be used for
typed constant data) }
ts.increfcount;
@ -4845,7 +4845,7 @@ implementation
end
else
pname:=@optionalname;
sym:=cfieldvarsym.create(pname^,vs_value,def,[],true);
sym:=cfieldvarsym.create(pname^,vs_value,def,[]);
symtable.insert(sym);
trecordsymtable(symtable).addfield(sym,vis_hidden);
result:=sym;
@ -7608,7 +7608,7 @@ implementation
tObjectSymtable(symtable).datasize:=align(tObjectSymtable(symtable).datasize,sizeof(pint));
tObjectSymtable(symtable).alignrecord(tObjectSymtable(symtable).datasize,sizeof(pint));
end;
vmt_field:=cfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[],true);
vmt_field:=cfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[]);
hidesym(vmt_field);
tObjectSymtable(symtable).insert(vmt_field);
tObjectSymtable(symtable).addfield(tfieldvarsym(vmt_field),vis_hidden);

View File

@ -48,7 +48,7 @@ interface
public
{ this is Nil if the symbol has no RTTI attributes }
rtti_attribute_list : trtti_attribute_list;
constructor create(st:tsymtyp;const n : string;doregister:boolean);
constructor create(st:tsymtyp;const n : string);
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
destructor destroy;override;
procedure ppuwrite(ppufile:tcompilerppufile);virtual;
@ -87,7 +87,7 @@ interface
tunitsym = class(Tstoredsym)
module : tobject; { tmodule }
constructor create(const n : string;amodule : tobject;doregister:boolean);virtual;
constructor create(const n : string;amodule : tobject);virtual;
constructor ppuload(ppufile:tcompilerppufile);
destructor destroy;override;
{ do not override this routine in platform-specific subclasses,
@ -162,7 +162,7 @@ interface
typedef : tdef;
typedefderef : tderef;
fprettyname : ansistring;
constructor create(const n : string;def:tdef;doregister:boolean);virtual;
constructor create(const n : string;def:tdef);virtual;
destructor destroy;override;
constructor ppuload(ppufile:tcompilerppufile);
{ do not override this routine in platform-specific subclasses,
@ -186,7 +186,7 @@ interface
addr_taken : boolean;
{ true if the variable is accessed in a different scope }
different_scope : boolean;
constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
@ -224,7 +224,7 @@ interface
{$else symansistr}
cachedmangledname: pshortstring; { mangled name for ObjC or Java }
{$endif symansistr}
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);virtual;
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
constructor ppuload(ppufile:tcompilerppufile);
{ do not override this routine in platform-specific subclasses,
override ppuwrite_platform instead }
@ -247,7 +247,7 @@ interface
{ the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
(not written to ppu, because not important and would change interface crc) }
noregvarinitneeded : boolean;
constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
function globalasmsym: boolean;
procedure ppuwrite(ppufile:tcompilerppufile);override;
@ -256,7 +256,7 @@ interface
end;
tlocalvarsym = class(tabstractnormalvarsym)
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);virtual;
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
constructor ppuload(ppufile:tcompilerppufile);
{ do not override this routine in platform-specific subclasses,
override ppuwrite_platform instead }
@ -303,7 +303,7 @@ interface
to the symbol of the corresponding class field }
fieldvarsym : tfieldvarsym;
fieldvarsymderef : tderef;
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);virtual;
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
constructor create_dll(const n : string;vsp:tvarspez;def:tdef);virtual;
constructor create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);virtual;
constructor create_from_fieldvar(const n:string;fieldvar:tfieldvarsym);virtual;
@ -555,7 +555,7 @@ implementation
TSYM (base for all symtypes)
****************************************************************************}
constructor tstoredsym.create(st:tsymtyp;const n : string;doregister:boolean);
constructor tstoredsym.create(st:tsymtyp;const n : string);
begin
inherited create(st,n);
end;
@ -677,7 +677,7 @@ implementation
constructor tlabelsym.create(const n : string);
begin
inherited create(labelsym,n,true);
inherited create(labelsym,n);
used:=false;
defined:=false;
nonlocal:=false;
@ -724,9 +724,9 @@ implementation
TUNITSYM
****************************************************************************}
constructor tunitsym.create(const n : string;amodule : tobject;doregister:boolean);
constructor tunitsym.create(const n : string;amodule : tobject);
begin
inherited create(unitsym,n,doregister);
inherited create(unitsym,n);
module:=amodule;
end;
@ -755,7 +755,7 @@ implementation
constructor tprogramparasym.create(const n : string; i : dword);
begin
inherited create(programparasym,n,true);
inherited create(programparasym,n);
isoindex:=i;
end;
@ -783,7 +783,7 @@ implementation
constructor tnamespacesym.create(const n : string);
begin
inherited create(namespacesym,n,true);
inherited create(namespacesym,n);
unitsym:=nil;
unitsymderef.reset;
end;
@ -825,7 +825,7 @@ implementation
begin
if not(ts_lowercase_proc_start in current_settings.targetswitches) or
(n='') then
inherited create(procsym,n,true)
inherited create(procsym,n)
else
begin
{ YToX -> yToX
@ -844,7 +844,7 @@ implementation
end;
inc(i);
end;
inherited create(procsym,lower(copy(n,1,i-1))+copy(n,i,length(n)),true);
inherited create(procsym,lower(copy(n,1,i-1))+copy(n,i,length(n)));
end;
FProcdefList:=TFPObjectList.Create(false);
FProcdefderefList:=nil;
@ -1361,7 +1361,7 @@ implementation
var
pap : tpropaccesslisttypes;
begin
inherited create(propertysym,n,true);
inherited create(propertysym,n);
propoptions:=[];
index:=0;
default:=0;
@ -1621,9 +1621,9 @@ implementation
TABSTRACTVARSYM
****************************************************************************}
constructor tabstractvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor tabstractvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
begin
inherited create(st,n,doregister);
inherited create(st,n);
vardef:=def;
vardefderef.reset;
varspez:=vsp;
@ -1781,9 +1781,9 @@ implementation
TFIELDVARSYM
****************************************************************************}
constructor tfieldvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor tfieldvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
begin
inherited create(fieldvarsym,n,vsp,def,vopts,doregister);
inherited create(fieldvarsym,n,vsp,def,vopts);
fieldoffset:=-1;
end;
@ -1871,9 +1871,9 @@ implementation
TABSTRACTNORMALVARSYM
****************************************************************************}
constructor tabstractnormalvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor tabstractnormalvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
begin
inherited create(st,n,vsp,def,vopts,doregister);
inherited create(st,n,vsp,def,vopts);
fillchar(localloc,sizeof(localloc),0);
fillchar(initialloc,sizeof(initialloc),0);
defaultconstsym:=nil;
@ -1933,9 +1933,9 @@ implementation
Tstaticvarsym
****************************************************************************}
constructor tstaticvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor tstaticvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
begin
inherited create(staticvarsym,n,vsp,def,vopts,doregister);
inherited create(staticvarsym,n,vsp,def,vopts);
fieldvarsymderef.reset;
{$ifdef symansistr}
_mangledname:='';
@ -1947,20 +1947,20 @@ implementation
constructor tstaticvarsym.create_dll(const n : string;vsp:tvarspez;def:tdef);
begin
tstaticvarsym(self).create(n,vsp,def,[vo_is_dll_var],true);
tstaticvarsym(self).create(n,vsp,def,[vo_is_dll_var]);
end;
constructor tstaticvarsym.create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);
begin
tstaticvarsym(self).create(n,vsp,def,[],true);
tstaticvarsym(self).create(n,vsp,def,[]);
set_mangledname(mangled);
end;
constructor tstaticvarsym.create_from_fieldvar(const n: string;fieldvar:tfieldvarsym);
begin
create(internal_static_field_name(n),vs_value,fieldvar.vardef,[],true);
create(internal_static_field_name(n),vs_value,fieldvar.vardef,[]);
fieldvarsym:=fieldvar;
end;
@ -2129,9 +2129,9 @@ implementation
TLOCALVARSYM
****************************************************************************}
constructor tlocalvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
constructor tlocalvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
begin
inherited create(localvarsym,n,vsp,def,vopts,doregister);
inherited create(localvarsym,n,vsp,def,vopts);
end;
@ -2155,7 +2155,7 @@ implementation
constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);
begin
inherited create(paravarsym,n,vsp,def,vopts,true);
inherited create(paravarsym,n,vsp,def,vopts);
if (vsp in [vs_var,vs_value,vs_const,vs_constref]) and
not(vo_is_funcret in vopts) then
varstate := vs_initialised;
@ -2243,14 +2243,14 @@ implementation
constructor tabsolutevarsym.create(const n : string;def:tdef);
begin
inherited create(absolutevarsym,n,vs_value,def,[],true);
inherited create(absolutevarsym,n,vs_value,def,[]);
ref:=nil;
end;
constructor tabsolutevarsym.create_ref(const n : string;def:tdef;_ref:tpropaccesslist);
begin
inherited create(absolutevarsym,n,vs_value,def,[],true);
inherited create(absolutevarsym,n,vs_value,def,[]);
ref:=_ref;
end;
@ -2333,7 +2333,7 @@ implementation
constructor tconstsym.create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);
begin
inherited create(constsym,n,true);
inherited create(constsym,n);
fillchar(value, sizeof(value), #0);
consttyp:=t;
value.valueord:=v;
@ -2344,7 +2344,7 @@ implementation
constructor tconstsym.create_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);
begin
inherited create(constsym,n,true);
inherited create(constsym,n);
fillchar(value, sizeof(value), #0);
consttyp:=t;
value.valueordptr:=v;
@ -2355,7 +2355,7 @@ implementation
constructor tconstsym.create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
begin
inherited create(constsym,n,true);
inherited create(constsym,n);
fillchar(value, sizeof(value), #0);
consttyp:=t;
value.valueptr:=v;
@ -2366,7 +2366,7 @@ implementation
constructor tconstsym.create_string(const n : string;t : tconsttyp;str:pchar;l:longint;def: tdef);
begin
inherited create(constsym,n,true);
inherited create(constsym,n);
fillchar(value, sizeof(value), #0);
consttyp:=t;
value.valueptr:=str;
@ -2381,7 +2381,7 @@ implementation
constructor tconstsym.create_wstring(const n : string;t : tconsttyp;pw:pcompilerwidestring);
begin
inherited create(constsym,n,true);
inherited create(constsym,n);
fillchar(value, sizeof(value), #0);
consttyp:=t;
pcompilerwidestring(value.valueptr):=pw;
@ -2581,7 +2581,7 @@ implementation
constructor tenumsym.create(const n : string;def : tenumdef;v : longint);
begin
inherited create(enumsym,n,true);
inherited create(enumsym,n);
definition:=def;
definitionderef.reset;
value:=v;
@ -2623,10 +2623,10 @@ implementation
****************************************************************************}
constructor ttypesym.create(const n : string;def:tdef;doregister:boolean);
constructor ttypesym.create(const n : string;def:tdef);
begin
inherited create(typesym,n,doregister);
inherited create(typesym,n);
typedef:=def;
typedefderef.reset;
{ register the typesym for the definition }
@ -2695,7 +2695,7 @@ implementation
var
s : shortstring;
begin
inherited create(syssym,n,true);
inherited create(syssym,n);
number:=l;
str(longint(l),s);
if assigned(syssym_list.find(s)) then
@ -2743,7 +2743,7 @@ implementation
constructor tmacro.create(const n : string);
begin
inherited create(macrosym,n,true);
inherited create(macrosym,n);
owner:=nil;
defined:=false;
is_used:=false;

View File

@ -133,7 +133,7 @@ implementation
(def.typ=recorddef) and
not assigned(def.typesym) then
begin
ts:=ctypesym.create(trecorddef(def).symtable.realname^,def,true);
ts:=ctypesym.create(trecorddef(def).symtable.realname^,def);
st.insert(ts);
ts.visibility:=vis_strictprivate;
{ this typesym can't be used by any Pascal code, so make sure we don't