mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 18:49:21 +02:00
o fixes handling of iso i/o parameters/program parameters:
* explicit reset is needed * variable must be declared again git-svn-id: trunk@30757 -
This commit is contained in:
parent
d1e48b0f71
commit
7dd1d6aa77
@ -94,6 +94,9 @@ type
|
|||||||
tcpuunitsym = class(tunitsym)
|
tcpuunitsym = class(tunitsym)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -162,6 +165,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -115,6 +115,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -195,6 +199,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -119,6 +119,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -199,6 +203,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -115,6 +115,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -195,6 +199,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -115,6 +115,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -195,6 +199,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -124,6 +124,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -250,6 +254,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -153,6 +153,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -493,6 +497,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -115,6 +115,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -195,6 +199,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -144,6 +144,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -914,6 +918,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -124,6 +124,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -249,6 +253,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -117,6 +117,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -197,6 +201,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -1921,7 +1921,7 @@ type
|
|||||||
resources_used : boolean;
|
resources_used : boolean;
|
||||||
program_name : ansistring;
|
program_name : ansistring;
|
||||||
consume_semicolon_after_uses : boolean;
|
consume_semicolon_after_uses : boolean;
|
||||||
ps : tstaticvarsym;
|
ps : tprogramparasym;
|
||||||
paramnum : longint;
|
paramnum : longint;
|
||||||
textsym : ttypesym;
|
textsym : ttypesym;
|
||||||
sc : array of TProgramParam;
|
sc : array of TProgramParam;
|
||||||
@ -2076,10 +2076,8 @@ type
|
|||||||
internalerror(2013011201);
|
internalerror(2013011201);
|
||||||
for i:=0 to high(sc) do
|
for i:=0 to high(sc) do
|
||||||
begin
|
begin
|
||||||
ps:=cstaticvarsym.create(sc[i].name,vs_value,textsym.typedef,[]);
|
ps:=cprogramparasym.create(sc[i].name,sc[i].nr);
|
||||||
ps.isoindex:=sc[i].nr;
|
|
||||||
current_module.localsymtable.insert(ps,true);
|
current_module.localsymtable.insert(ps,true);
|
||||||
cnodeutils.insertbssdata(tstaticvarsym(ps));
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -124,6 +124,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -249,6 +253,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -121,6 +121,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -273,6 +277,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -115,6 +115,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -195,6 +199,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -585,7 +585,7 @@ type
|
|||||||
staticvarsym,localvarsym,paravarsym,fieldvarsym,
|
staticvarsym,localvarsym,paravarsym,fieldvarsym,
|
||||||
typesym,procsym,unitsym,constsym,enumsym,
|
typesym,procsym,unitsym,constsym,enumsym,
|
||||||
errorsym,syssym,labelsym,absolutevarsym,propertysym,
|
errorsym,syssym,labelsym,absolutevarsym,propertysym,
|
||||||
macrosym,namespacesym,undefinedsym
|
macrosym,namespacesym,undefinedsym,programparasym
|
||||||
);
|
);
|
||||||
|
|
||||||
{ State of the variable:
|
{ State of the variable:
|
||||||
@ -704,11 +704,11 @@ inherited_objectoptions : tobjectoptions = [oo_has_virtual,oo_has_private,oo_has
|
|||||||
pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
|
pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
SymTypeName : array[tsymtyp] of string[12] = (
|
SymTypeName : array[tsymtyp] of string[14] = (
|
||||||
'abstractsym','globalvar','localvar','paravar','fieldvar',
|
'abstractsym','globalvar','localvar','paravar','fieldvar',
|
||||||
'type','proc','unit','const','enum',
|
'type','proc','unit','const','enum',
|
||||||
'errorsym','system sym','label','absolutevar','property',
|
'errorsym','system sym','label','absolutevar','property',
|
||||||
'macrosym','namespace','undefinedsym'
|
'macrosym','namespace','undefinedsym','programparasym'
|
||||||
);
|
);
|
||||||
|
|
||||||
typName : array[tdeftyp] of string[12] = (
|
typName : array[tdeftyp] of string[12] = (
|
||||||
|
@ -89,6 +89,17 @@ interface
|
|||||||
end;
|
end;
|
||||||
tunitsymclass = class of tunitsym;
|
tunitsymclass = class of tunitsym;
|
||||||
|
|
||||||
|
tprogramparasym = class(Tstoredsym)
|
||||||
|
isoindex : dword;
|
||||||
|
constructor create(const n : string;i : dword);virtual;
|
||||||
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
|
destructor destroy;override;
|
||||||
|
{ do not override this routine in platform-specific subclasses,
|
||||||
|
override ppuwrite_platform instead }
|
||||||
|
procedure ppuwrite(ppufile:tcompilerppufile);override;final;
|
||||||
|
end;
|
||||||
|
tprogramparasymclass = class of tprogramparasym;
|
||||||
|
|
||||||
tnamespacesym = class(Tstoredsym)
|
tnamespacesym = class(Tstoredsym)
|
||||||
unitsym:tsym;
|
unitsym:tsym;
|
||||||
unitsymderef:tderef;
|
unitsymderef:tderef;
|
||||||
@ -460,6 +471,7 @@ interface
|
|||||||
|
|
||||||
clabelsym: tlabelsymclass;
|
clabelsym: tlabelsymclass;
|
||||||
cunitsym: tunitsymclass;
|
cunitsym: tunitsymclass;
|
||||||
|
cprogramparasym: tprogramparasymclass;
|
||||||
cnamespacesym: tnamespacesymclass;
|
cnamespacesym: tnamespacesymclass;
|
||||||
cprocsym: tprocsymclass;
|
cprocsym: tprocsymclass;
|
||||||
ctypesym: ttypesymclass;
|
ctypesym: ttypesymclass;
|
||||||
@ -534,7 +546,6 @@ implementation
|
|||||||
Message1(sym_w_non_implemented_symbol,srsym.realname);
|
Message1(sym_w_non_implemented_symbol,srsym.realname);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TSYM (base for all symtypes)
|
TSYM (base for all symtypes)
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
@ -693,6 +704,34 @@ implementation
|
|||||||
writeentry(ppufile,ibunitsym);
|
writeentry(ppufile,ibunitsym);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{****************************************************************************
|
||||||
|
TPROGRAMPARASYM
|
||||||
|
****************************************************************************}
|
||||||
|
|
||||||
|
constructor tprogramparasym.create(const n : string; i : dword);
|
||||||
|
begin
|
||||||
|
inherited create(programparasym,n);
|
||||||
|
isoindex:=i;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor tprogramparasym.ppuload(ppufile : tcompilerppufile);
|
||||||
|
begin
|
||||||
|
{ program parameter syms (iso pascal style) might be never written to a ppu }
|
||||||
|
internalerror(2015050102);
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor tprogramparasym.destroy;
|
||||||
|
begin
|
||||||
|
inherited destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure tprogramparasym.ppuwrite(ppufile : tcompilerppufile);
|
||||||
|
begin
|
||||||
|
{ program parameter syms (iso pascal style) might be never written to a ppu }
|
||||||
|
internalerror(2015050101);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TNAMESPACESYM
|
TNAMESPACESYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
@ -2192,6 +2192,14 @@ implementation
|
|||||||
if sym.typ=symconst.namespacesym then
|
if sym.typ=symconst.namespacesym then
|
||||||
tnamespacesym(sym).unitsym:=tsym(hsym);
|
tnamespacesym(sym).unitsym:=tsym(hsym);
|
||||||
end
|
end
|
||||||
|
{ iso mode program parameters: staticvarsyms might have the same name as a program parameters,
|
||||||
|
in this case, copy the isoindex and make the original symbol invisible }
|
||||||
|
else if (m_iso in current_settings.modeswitches) and (hsym.typ=programparasym) and (sym.typ=staticvarsym)
|
||||||
|
and (tstaticvarsym(hsym).isoindex<>0) then
|
||||||
|
begin
|
||||||
|
HideSym(hsym);
|
||||||
|
tstaticvarsym(sym).isoindex:=tprogramparasym(hsym).isoindex;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
DuplicateSym(hashedid,sym,hsym,false);
|
DuplicateSym(hashedid,sym,hsym,false);
|
||||||
result:=true;
|
result:=true;
|
||||||
|
@ -115,6 +115,10 @@ type
|
|||||||
end;
|
end;
|
||||||
tcpuunitsymclass = class of tcpuunitsym;
|
tcpuunitsymclass = class of tcpuunitsym;
|
||||||
|
|
||||||
|
tcpuprogramparasym = class(tprogramparasym)
|
||||||
|
end;
|
||||||
|
tcpuprogramparasymclass = class(tprogramparasym);
|
||||||
|
|
||||||
tcpunamespacesym = class(tnamespacesym)
|
tcpunamespacesym = class(tnamespacesym)
|
||||||
end;
|
end;
|
||||||
tcpunamespacesymclass = class of tcpunamespacesym;
|
tcpunamespacesymclass = class of tcpunamespacesym;
|
||||||
@ -195,6 +199,7 @@ begin
|
|||||||
{ used tsym classes }
|
{ used tsym classes }
|
||||||
clabelsym:=tcpulabelsym;
|
clabelsym:=tcpulabelsym;
|
||||||
cunitsym:=tcpuunitsym;
|
cunitsym:=tcpuunitsym;
|
||||||
|
cprogramparasym:=tcpuprogramparasym;
|
||||||
cnamespacesym:=tcpunamespacesym;
|
cnamespacesym:=tcpunamespacesym;
|
||||||
cprocsym:=tcpuprocsym;
|
cprocsym:=tcpuprocsym;
|
||||||
ctypesym:=tcputypesym;
|
ctypesym:=tcputypesym;
|
||||||
|
@ -646,12 +646,10 @@ begin
|
|||||||
assign(t,paramstr(nr));
|
assign(t,paramstr(nr));
|
||||||
{$else FPC_HAS_FEATURE_COMMANDARGS}
|
{$else FPC_HAS_FEATURE_COMMANDARGS}
|
||||||
{ primitive workaround for targets supporting no command line arguments,
|
{ primitive workaround for targets supporting no command line arguments,
|
||||||
invent some file name, this will be fixed later on anways because
|
invent some file name, try to avoid complex procedures like concating strings which might
|
||||||
the current way of handling iso program parameters is apparently
|
pull-in bigger parts of the rtl }
|
||||||
wrong }
|
|
||||||
assign(t,chr((nr mod 16)+65));
|
assign(t,chr((nr mod 16)+65));
|
||||||
{$endif FPC_HAS_FEATURE_COMMANDARGS}
|
{$endif FPC_HAS_FEATURE_COMMANDARGS}
|
||||||
reset(t);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user