mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 12:25:59 +02:00
* set vo_explicit_paraloc flag
This commit is contained in:
parent
a266052fd9
commit
78c2af7b3c
@ -990,7 +990,7 @@ type
|
|||||||
for i:=0 to varargsparas.count-1 do
|
for i:=0 to varargsparas.count-1 do
|
||||||
begin
|
begin
|
||||||
hp:=tparavarsym(varargsparas[i]);
|
hp:=tparavarsym(varargsparas[i]);
|
||||||
hpn:=tparavarsym.create(hp.realname,hp.paranr,hp.varspez,hp.vartype);
|
hpn:=tparavarsym.create(hp.realname,hp.paranr,hp.varspez,hp.vartype,[]);
|
||||||
n.varargsparas.add(hpn);
|
n.varargsparas.add(hpn);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -1410,7 +1410,7 @@ type
|
|||||||
begin
|
begin
|
||||||
if cpf_varargs_para in pt.callparaflags then
|
if cpf_varargs_para in pt.callparaflags then
|
||||||
begin
|
begin
|
||||||
varargspara:=tparavarsym.create('va'+tostr(i),i,vs_value,pt.resulttype);
|
varargspara:=tparavarsym.create('va'+tostr(i),i,vs_value,pt.resulttype,[]);
|
||||||
dec(i);
|
dec(i);
|
||||||
{ varargspara is left-right, use insert
|
{ varargspara is left-right, use insert
|
||||||
instead of concat }
|
instead of concat }
|
||||||
@ -2432,7 +2432,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.268 2004-12-05 12:28:11 peter
|
Revision 1.269 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.268 2004/12/05 12:28:11 peter
|
||||||
* procvar handling for tp procvar mode fixed
|
* procvar handling for tp procvar mode fixed
|
||||||
* proc to procvar moved from addrnode to typeconvnode
|
* proc to procvar moved from addrnode to typeconvnode
|
||||||
* inlininginfo is now allocated only for inline routines that
|
* inlininginfo is now allocated only for inline routines that
|
||||||
|
@ -1090,8 +1090,7 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
with tparavarsym(p) do
|
with tparavarsym(p) do
|
||||||
begin
|
begin
|
||||||
vs:=tparavarsym.create(realname,paranr,varspez,vartype);
|
vs:=tparavarsym.create(realname,paranr,varspez,vartype,varoptions);
|
||||||
vs.varoptions:=varoptions;
|
|
||||||
vs.defaultconstsym:=defaultconstsym;
|
vs.defaultconstsym:=defaultconstsym;
|
||||||
newparast.insert(vs);
|
newparast.insert(vs);
|
||||||
end;
|
end;
|
||||||
@ -2498,7 +2497,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.166 2004-12-05 12:28:11 peter
|
Revision 1.167 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.166 2004/12/05 12:28:11 peter
|
||||||
* procvar handling for tp procvar mode fixed
|
* procvar handling for tp procvar mode fixed
|
||||||
* proc to procvar moved from addrnode to typeconvnode
|
* proc to procvar moved from addrnode to typeconvnode
|
||||||
* inlininginfo is now allocated only for inline routines that
|
* inlininginfo is now allocated only for inline routines that
|
||||||
|
@ -105,9 +105,7 @@ implementation
|
|||||||
else
|
else
|
||||||
paranr:=paranr_result;
|
paranr:=paranr_result;
|
||||||
{ Generate result variable accessing function result }
|
{ Generate result variable accessing function result }
|
||||||
vs:=tparavarsym.create('$result',paranr,vs_var,pd.rettype);
|
vs:=tparavarsym.create('$result',paranr,vs_var,pd.rettype,[vo_is_funcret,vo_is_hidden_para]);
|
||||||
include(vs.varoptions,vo_is_funcret);
|
|
||||||
include(vs.varoptions,vo_is_hidden_para);
|
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
{ Store the this symbol as funcretsym for procedures }
|
{ Store the this symbol as funcretsym for procedures }
|
||||||
if pd.deftype=procdef then
|
if pd.deftype=procdef then
|
||||||
@ -132,9 +130,7 @@ implementation
|
|||||||
{ Generate result variable accessing function result, it
|
{ Generate result variable accessing function result, it
|
||||||
can't be put in a register since it must be accessable
|
can't be put in a register since it must be accessable
|
||||||
from the framepointer }
|
from the framepointer }
|
||||||
vs:=tparavarsym.create('$parentfp',paranr_parentfp,vs_var,voidpointertype);
|
vs:=tparavarsym.create('$parentfp',paranr_parentfp,vs_var,voidpointertype,[vo_is_parentfp,vo_is_hidden_para]);
|
||||||
include(vs.varoptions,vo_is_parentfp);
|
|
||||||
include(vs.varoptions,vo_is_hidden_para);
|
|
||||||
vs.varregable:=vr_none;
|
vs.varregable:=vr_none;
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
|
|
||||||
@ -155,9 +151,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ Generate self variable }
|
{ Generate self variable }
|
||||||
tt:=voidpointertype;
|
tt:=voidpointertype;
|
||||||
vs:=tparavarsym.create('$self',paranr_self,vs_value,tt);
|
vs:=tparavarsym.create('$self',paranr_self,vs_value,tt,[vo_is_self,vo_is_hidden_para]);
|
||||||
include(vs.varoptions,vo_is_self);
|
|
||||||
include(vs.varoptions,vo_is_hidden_para);
|
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -175,9 +169,7 @@ implementation
|
|||||||
{ can't use classrefdef as type because inheriting
|
{ can't use classrefdef as type because inheriting
|
||||||
will then always file because of a type mismatch }
|
will then always file because of a type mismatch }
|
||||||
tt:=voidpointertype;
|
tt:=voidpointertype;
|
||||||
vs:=tparavarsym.create('$vmt',paranr_vmt,vs_value,tt);
|
vs:=tparavarsym.create('$vmt',paranr_vmt,vs_value,tt,[vo_is_vmt,vo_is_hidden_para]);
|
||||||
include(vs.varoptions,vo_is_vmt);
|
|
||||||
include(vs.varoptions,vo_is_hidden_para);
|
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -197,9 +189,7 @@ implementation
|
|||||||
vsp:=vs_var;
|
vsp:=vs_var;
|
||||||
tt.setdef(tprocdef(pd)._class);
|
tt.setdef(tprocdef(pd)._class);
|
||||||
end;
|
end;
|
||||||
vs:=tparavarsym.create('$self',paranr_self,vsp,tt);
|
vs:=tparavarsym.create('$self',paranr_self,vsp,tt,[vo_is_self,vo_is_hidden_para]);
|
||||||
include(vs.varoptions,vo_is_self);
|
|
||||||
include(vs.varoptions,vo_is_hidden_para);
|
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
|
|
||||||
akttokenpos:=storepos;
|
akttokenpos:=storepos;
|
||||||
@ -230,8 +220,7 @@ implementation
|
|||||||
when it is returning in a register }
|
when it is returning in a register }
|
||||||
if not paramanager.ret_in_param(pd.rettype.def,pd.proccalloption) then
|
if not paramanager.ret_in_param(pd.rettype.def,pd.proccalloption) then
|
||||||
begin
|
begin
|
||||||
vs:=tlocalvarsym.create('$result',vs_value,pd.rettype);
|
vs:=tlocalvarsym.create('$result',vs_value,pd.rettype,[vo_is_funcret]);
|
||||||
include(vs.varoptions,vo_is_funcret);
|
|
||||||
pd.localst.insert(vs);
|
pd.localst.insert(vs);
|
||||||
pd.funcretsym:=vs;
|
pd.funcretsym:=vs;
|
||||||
end;
|
end;
|
||||||
@ -285,9 +274,7 @@ implementation
|
|||||||
{ needs high parameter ? }
|
{ needs high parameter ? }
|
||||||
if paramanager.push_high_param(varspez,vartype.def,pd.proccalloption) then
|
if paramanager.push_high_param(varspez,vartype.def,pd.proccalloption) then
|
||||||
begin
|
begin
|
||||||
hvs:=tparavarsym.create('$high'+name,paranr+1,vs_const,sinttype);
|
hvs:=tparavarsym.create('$high'+name,paranr+1,vs_const,sinttype,[vo_is_high_para,vo_is_hidden_para]);
|
||||||
include(hvs.varoptions,vo_is_high_para);
|
|
||||||
include(hvs.varoptions,vo_is_hidden_para);
|
|
||||||
owner.insert(hvs);
|
owner.insert(hvs);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -451,7 +438,7 @@ implementation
|
|||||||
sc.reset;
|
sc.reset;
|
||||||
repeat
|
repeat
|
||||||
inc(paranr);
|
inc(paranr);
|
||||||
vs:=tparavarsym.create(orgpattern,paranr*10,varspez,generrortype);
|
vs:=tparavarsym.create(orgpattern,paranr*10,varspez,generrortype,[]);
|
||||||
currparast.insert(vs);
|
currparast.insert(vs);
|
||||||
if assigned(vs.owner) then
|
if assigned(vs.owner) then
|
||||||
sc.insert(vs)
|
sc.insert(vs)
|
||||||
@ -586,6 +573,7 @@ implementation
|
|||||||
if (paranr>1) and not(explicit_paraloc) then
|
if (paranr>1) and not(explicit_paraloc) then
|
||||||
Message(parser_e_paraloc_all_paras);
|
Message(parser_e_paraloc_all_paras);
|
||||||
explicit_paraloc:=true;
|
explicit_paraloc:=true;
|
||||||
|
include(vs.varoptions,vo_has_explicit_paraloc);
|
||||||
if not(paramanager.parseparaloc(vs,upper(locationstr))) then
|
if not(paramanager.parseparaloc(vs,upper(locationstr))) then
|
||||||
message(parser_e_illegal_explicit_paraloc);
|
message(parser_e_illegal_explicit_paraloc);
|
||||||
end
|
end
|
||||||
@ -1228,9 +1216,7 @@ begin
|
|||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
tprocdef(pd).libsym:=sym;
|
tprocdef(pd).libsym:=sym;
|
||||||
vs:=tparavarsym.create('$syscalllib',paranr_syscall,vs_value,tabstractvarsym(sym).vartype);
|
vs:=tparavarsym.create('$syscalllib',paranr_syscall,vs_value,tabstractvarsym(sym).vartype,[vo_is_syscall_lib,vo_is_hidden_para,vo_has_explicit_paraloc]);
|
||||||
include(vs.varoptions,vo_is_syscall_lib);
|
|
||||||
include(vs.varoptions,vo_is_hidden_para);
|
|
||||||
paramanager.parseparaloc(vs,'A6');
|
paramanager.parseparaloc(vs,'A6');
|
||||||
pd.parast.insert(vs);
|
pd.parast.insert(vs);
|
||||||
end
|
end
|
||||||
@ -2358,7 +2344,10 @@ const
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.217 2004-12-05 12:28:11 peter
|
Revision 1.218 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.217 2004/12/05 12:28:11 peter
|
||||||
* procvar handling for tp procvar mode fixed
|
* procvar handling for tp procvar mode fixed
|
||||||
* proc to procvar moved from addrnode to typeconvnode
|
* proc to procvar moved from addrnode to typeconvnode
|
||||||
* inlininginfo is now allocated only for inline routines that
|
* inlininginfo is now allocated only for inline routines that
|
||||||
|
@ -278,7 +278,7 @@ implementation
|
|||||||
sc.reset;
|
sc.reset;
|
||||||
repeat
|
repeat
|
||||||
inc(paranr);
|
inc(paranr);
|
||||||
hreadparavs:=tparavarsym.create(orgpattern,10*paranr,varspez,generrortype);
|
hreadparavs:=tparavarsym.create(orgpattern,10*paranr,varspez,generrortype,[]);
|
||||||
readprocdef.parast.insert(hreadparavs);
|
readprocdef.parast.insert(hreadparavs);
|
||||||
sc.insert(hreadparavs);
|
sc.insert(hreadparavs);
|
||||||
consume(_ID);
|
consume(_ID);
|
||||||
@ -309,7 +309,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
hreadparavs.vartype:=tt;
|
hreadparavs.vartype:=tt;
|
||||||
{ also update the writeprocdef }
|
{ also update the writeprocdef }
|
||||||
hparavs:=tparavarsym.create(hreadparavs.realname,hreadparavs.paranr,vs_value,tt);
|
hparavs:=tparavarsym.create(hreadparavs.realname,hreadparavs.paranr,vs_value,tt,[]);
|
||||||
writeprocdef.parast.insert(hparavs);
|
writeprocdef.parast.insert(hparavs);
|
||||||
hreadparavs:=tparavarsym(hreadparavs.listnext);
|
hreadparavs:=tparavarsym(hreadparavs.listnext);
|
||||||
end;
|
end;
|
||||||
@ -357,9 +357,9 @@ implementation
|
|||||||
include(p.propoptions,ppo_indexed);
|
include(p.propoptions,ppo_indexed);
|
||||||
{ concat a longint to the para templates }
|
{ concat a longint to the para templates }
|
||||||
inc(paranr);
|
inc(paranr);
|
||||||
hparavs:=tparavarsym.create('$index',10*paranr,vs_value,p.indextype);
|
hparavs:=tparavarsym.create('$index',10*paranr,vs_value,p.indextype,[]);
|
||||||
readprocdef.parast.insert(hparavs);
|
readprocdef.parast.insert(hparavs);
|
||||||
hparavs:=tparavarsym.create('$index',10*paranr,vs_value,p.indextype);
|
hparavs:=tparavarsym.create('$index',10*paranr,vs_value,p.indextype,[]);
|
||||||
writeprocdef.parast.insert(hparavs);
|
writeprocdef.parast.insert(hparavs);
|
||||||
pt.free;
|
pt.free;
|
||||||
end;
|
end;
|
||||||
@ -438,7 +438,7 @@ implementation
|
|||||||
of the of the property }
|
of the of the property }
|
||||||
writeprocdef.rettype:=voidtype;
|
writeprocdef.rettype:=voidtype;
|
||||||
inc(paranr);
|
inc(paranr);
|
||||||
hparavs:=tparavarsym.create('$value',10*paranr,vs_value,p.proptype);
|
hparavs:=tparavarsym.create('$value',10*paranr,vs_value,p.proptype,[]);
|
||||||
writeprocdef.parast.insert(hparavs);
|
writeprocdef.parast.insert(hparavs);
|
||||||
{ Insert hidden parameters }
|
{ Insert hidden parameters }
|
||||||
handle_calling_convention(writeprocdef);
|
handle_calling_convention(writeprocdef);
|
||||||
@ -611,7 +611,7 @@ implementation
|
|||||||
if (symtablestack.symtabletype=objectsymtable) and
|
if (symtablestack.symtabletype=objectsymtable) and
|
||||||
(sp_static in current_object_option) then
|
(sp_static in current_object_option) then
|
||||||
begin
|
begin
|
||||||
hstaticvs:=tglobalvarsym.create('$'+lower(symtablestack.name^)+'_'+vs.name,vs_value,tt);
|
hstaticvs:=tglobalvarsym.create('$'+lower(symtablestack.name^)+'_'+vs.name,vs_value,tt,[]);
|
||||||
symtablestack.defowner.owner.insert(hstaticvs);
|
symtablestack.defowner.owner.insert(hstaticvs);
|
||||||
insertbssdata(hstaticvs);
|
insertbssdata(hstaticvs);
|
||||||
end
|
end
|
||||||
@ -725,13 +725,13 @@ implementation
|
|||||||
repeat
|
repeat
|
||||||
case symtablestack.symtabletype of
|
case symtablestack.symtabletype of
|
||||||
localsymtable :
|
localsymtable :
|
||||||
vs:=tlocalvarsym.create(orgpattern,vs_value,generrortype);
|
vs:=tlocalvarsym.create(orgpattern,vs_value,generrortype,[]);
|
||||||
staticsymtable,
|
staticsymtable,
|
||||||
globalsymtable :
|
globalsymtable :
|
||||||
vs:=tglobalvarsym.create(orgpattern,vs_value,generrortype);
|
vs:=tglobalvarsym.create(orgpattern,vs_value,generrortype,[]);
|
||||||
recordsymtable,
|
recordsymtable,
|
||||||
objectsymtable :
|
objectsymtable :
|
||||||
vs:=tfieldvarsym.create(orgpattern,vs_value,generrortype);
|
vs:=tfieldvarsym.create(orgpattern,vs_value,generrortype,[]);
|
||||||
else
|
else
|
||||||
internalerror(200411064);
|
internalerror(200411064);
|
||||||
end;
|
end;
|
||||||
@ -1206,7 +1206,7 @@ implementation
|
|||||||
symtablestack:=symtablestack.next;
|
symtablestack:=symtablestack.next;
|
||||||
read_type(casetype,'',true);
|
read_type(casetype,'',true);
|
||||||
symtablestack:=oldsymtablestack;
|
symtablestack:=oldsymtablestack;
|
||||||
fieldvs:=tfieldvarsym.create(sorg,vs_value,casetype);
|
fieldvs:=tfieldvarsym.create(sorg,vs_value,casetype,[]);
|
||||||
tabstractrecordsymtable(symtablestack).insertfield(fieldvs,true);
|
tabstractrecordsymtable(symtablestack).insertfield(fieldvs,true);
|
||||||
end;
|
end;
|
||||||
if not(is_ordinal(casetype.def))
|
if not(is_ordinal(casetype.def))
|
||||||
@ -1265,7 +1265,7 @@ implementation
|
|||||||
unionsymtable.fieldalignment:=maxalignment;
|
unionsymtable.fieldalignment:=maxalignment;
|
||||||
uniontype.def:=uniondef;
|
uniontype.def:=uniondef;
|
||||||
uniontype.sym:=nil;
|
uniontype.sym:=nil;
|
||||||
UnionSym:=tfieldvarsym.create('$case',vs_value,uniontype);
|
UnionSym:=tfieldvarsym.create('$case',vs_value,uniontype,[]);
|
||||||
symtablestack:=symtablestack.next;
|
symtablestack:=symtablestack.next;
|
||||||
unionsymtable.addalignmentpadding;
|
unionsymtable.addalignmentpadding;
|
||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
@ -1306,7 +1306,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.86 2004-11-29 18:50:15 peter
|
Revision 1.87 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.86 2004/11/29 18:50:15 peter
|
||||||
* os2 fixes for import
|
* os2 fixes for import
|
||||||
* asmsymtype support for intel reader
|
* asmsymtype support for intel reader
|
||||||
|
|
||||||
|
@ -696,11 +696,11 @@ implementation
|
|||||||
is_class(ttypesym(srsym).restype.def) then
|
is_class(ttypesym(srsym).restype.def) then
|
||||||
begin
|
begin
|
||||||
ot:=ttypesym(srsym).restype;
|
ot:=ttypesym(srsym).restype;
|
||||||
sym:=tlocalvarsym.create(objrealname,vs_value,ot);
|
sym:=tlocalvarsym.create(objrealname,vs_value,ot,[]);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
sym:=tlocalvarsym.create(objrealname,vs_value,generrortype);
|
sym:=tlocalvarsym.create(objrealname,vs_value,generrortype,[]);
|
||||||
if (srsym.typ=typesym) then
|
if (srsym.typ=typesym) then
|
||||||
Message1(type_e_class_type_expected,ttypesym(srsym).restype.def.typename)
|
Message1(type_e_class_type_expected,ttypesym(srsym).restype.def.typename)
|
||||||
else
|
else
|
||||||
@ -1147,7 +1147,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.147 2004-12-05 12:28:11 peter
|
Revision 1.148 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.147 2004/12/05 12:28:11 peter
|
||||||
* procvar handling for tp procvar mode fixed
|
* procvar handling for tp procvar mode fixed
|
||||||
* proc to procvar moved from addrnode to typeconvnode
|
* proc to procvar moved from addrnode to typeconvnode
|
||||||
* inlininginfo is now allocated only for inline routines that
|
* inlininginfo is now allocated only for inline routines that
|
||||||
|
@ -216,12 +216,12 @@ implementation
|
|||||||
hrecst:=trecordsymtable.create(aktpackrecords);
|
hrecst:=trecordsymtable.create(aktpackrecords);
|
||||||
vmttype.setdef(trecorddef.create(hrecst));
|
vmttype.setdef(trecorddef.create(hrecst));
|
||||||
pvmttype.setdef(tpointerdef.create(vmttype));
|
pvmttype.setdef(tpointerdef.create(vmttype));
|
||||||
hrecst.insertfield(tfieldvarsym.create('$parent',vs_value,pvmttype),true);
|
hrecst.insertfield(tfieldvarsym.create('$parent',vs_value,pvmttype,[]),true);
|
||||||
hrecst.insertfield(tfieldvarsym.create('$length',vs_value,s32inttype),true);
|
hrecst.insertfield(tfieldvarsym.create('$length',vs_value,s32inttype,[]),true);
|
||||||
hrecst.insertfield(tfieldvarsym.create('$mlength',vs_value,s32inttype),true);
|
hrecst.insertfield(tfieldvarsym.create('$mlength',vs_value,s32inttype,[]),true);
|
||||||
vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
|
vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
|
||||||
tarraydef(vmtarraytype.def).setelementtype(voidpointertype);
|
tarraydef(vmtarraytype.def).setelementtype(voidpointertype);
|
||||||
hrecst.insertfield(tfieldvarsym.create('$__pfn',vs_value,vmtarraytype),true);
|
hrecst.insertfield(tfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]),true);
|
||||||
addtype('$__vtbl_ptr_type',vmttype);
|
addtype('$__vtbl_ptr_type',vmttype);
|
||||||
addtype('$pvmt',pvmttype);
|
addtype('$pvmt',pvmttype);
|
||||||
vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
|
vmtarraytype.setdef(tarraydef.create(0,1,s32inttype));
|
||||||
@ -229,8 +229,8 @@ implementation
|
|||||||
addtype('$vtblarray',vmtarraytype);
|
addtype('$vtblarray',vmtarraytype);
|
||||||
{ Add a type for methodpointers }
|
{ Add a type for methodpointers }
|
||||||
hrecst:=trecordsymtable.create(1);
|
hrecst:=trecordsymtable.create(1);
|
||||||
hrecst.insertfield(tfieldvarsym.create('$proc',vs_value,voidpointertype),true);
|
hrecst.insertfield(tfieldvarsym.create('$proc',vs_value,voidpointertype,[]),true);
|
||||||
hrecst.insertfield(tfieldvarsym.create('$self',vs_value,voidpointertype),true);
|
hrecst.insertfield(tfieldvarsym.create('$self',vs_value,voidpointertype,[]),true);
|
||||||
methodpointertype.setdef(trecorddef.create(hrecst));
|
methodpointertype.setdef(trecorddef.create(hrecst));
|
||||||
addtype('$methodpointer',methodpointertype);
|
addtype('$methodpointer',methodpointertype);
|
||||||
{ Add functions that require compiler magic }
|
{ Add functions that require compiler magic }
|
||||||
@ -537,7 +537,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.74 2004-12-07 13:52:54 michael
|
Revision 1.75 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.74 2004/12/07 13:52:54 michael
|
||||||
* Convert array of widechar to pwidechar instead of pchar
|
* Convert array of widechar to pwidechar instead of pchar
|
||||||
|
|
||||||
Revision 1.73 2004/11/08 22:09:59 peter
|
Revision 1.73 2004/11/08 22:09:59 peter
|
||||||
|
@ -148,7 +148,7 @@ interface
|
|||||||
varregable : tvarregable;
|
varregable : tvarregable;
|
||||||
varstate : tvarstate;
|
varstate : tvarstate;
|
||||||
notifications : Tlinkedlist;
|
notifications : Tlinkedlist;
|
||||||
constructor create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
@ -167,11 +167,9 @@ interface
|
|||||||
property vartype: ttype read _vartype write setvartype;
|
property vartype: ttype read _vartype write setvartype;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tvarsymclass = class of tabstractvarsym;
|
|
||||||
|
|
||||||
tfieldvarsym = class(tabstractvarsym)
|
tfieldvarsym = class(tabstractvarsym)
|
||||||
fieldoffset : aint; { offset in record/object }
|
fieldoffset : aint; { offset in record/object }
|
||||||
constructor create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
@ -183,7 +181,7 @@ interface
|
|||||||
defaultconstsym : tsym;
|
defaultconstsym : tsym;
|
||||||
defaultconstsymderef : tderef;
|
defaultconstsymderef : tderef;
|
||||||
localloc : TLocation; { register/reference for local var }
|
localloc : TLocation; { register/reference for local var }
|
||||||
constructor create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
procedure buildderef;override;
|
procedure buildderef;override;
|
||||||
@ -191,7 +189,7 @@ interface
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
tlocalvarsym = class(tabstractnormalvarsym)
|
tlocalvarsym = class(tabstractnormalvarsym)
|
||||||
constructor create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
@ -205,7 +203,7 @@ interface
|
|||||||
{$ifdef EXTDEBUG}
|
{$ifdef EXTDEBUG}
|
||||||
eqval : tequaltype;
|
eqval : tequaltype;
|
||||||
{$endif EXTDEBUG}
|
{$endif EXTDEBUG}
|
||||||
constructor create(const n : string;nr:word;vsp:tvarspez;const tt : ttype);
|
constructor create(const n : string;nr:word;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
@ -218,7 +216,7 @@ interface
|
|||||||
private
|
private
|
||||||
_mangledname : pstring;
|
_mangledname : pstring;
|
||||||
public
|
public
|
||||||
constructor create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
constructor create_dll(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor create_dll(const n : string;vsp:tvarspez;const tt : ttype);
|
||||||
constructor create_C(const n,mangled : string;vsp:tvarspez;const tt : ttype);
|
constructor create_C(const n,mangled : string;vsp:tvarspez;const tt : ttype);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
@ -1255,13 +1253,13 @@ implementation
|
|||||||
TABSTRACTVARSYM
|
TABSTRACTVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tabstractvarsym.create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor tabstractvarsym.create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(n);
|
inherited create(n);
|
||||||
vartype:=tt;
|
vartype:=tt;
|
||||||
varspez:=vsp;
|
varspez:=vsp;
|
||||||
varstate:=vs_declared;
|
varstate:=vs_declared;
|
||||||
varoptions:=[];
|
varoptions:=vopts;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1416,9 +1414,9 @@ implementation
|
|||||||
TFIELDVARSYM
|
TFIELDVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tfieldvarsym.create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor tfieldvarsym.create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vsp,tt);
|
inherited create(n,vsp,tt,vopts);
|
||||||
typ:=fieldvarsym;
|
typ:=fieldvarsym;
|
||||||
fieldoffset:=0;
|
fieldoffset:=0;
|
||||||
end;
|
end;
|
||||||
@ -1467,9 +1465,9 @@ implementation
|
|||||||
TABSTRACTNORMALVARSYM
|
TABSTRACTNORMALVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tabstractnormalvarsym.create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor tabstractnormalvarsym.create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vsp,tt);
|
inherited create(n,vsp,tt,vopts);
|
||||||
fillchar(localloc,sizeof(localloc),0);
|
fillchar(localloc,sizeof(localloc),0);
|
||||||
defaultconstsym:=nil;
|
defaultconstsym:=nil;
|
||||||
end;
|
end;
|
||||||
@ -1508,9 +1506,9 @@ implementation
|
|||||||
TGLOBALVARSYM
|
TGLOBALVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tglobalvarsym.create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor tglobalvarsym.create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vsp,tt);
|
inherited create(n,vsp,tt,vopts);
|
||||||
typ:=globalvarsym;
|
typ:=globalvarsym;
|
||||||
_mangledname:=nil;
|
_mangledname:=nil;
|
||||||
end;
|
end;
|
||||||
@ -1518,14 +1516,13 @@ implementation
|
|||||||
|
|
||||||
constructor tglobalvarsym.create_dll(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor tglobalvarsym.create_dll(const n : string;vsp:tvarspez;const tt : ttype);
|
||||||
begin
|
begin
|
||||||
tglobalvarsym(self).create(n,vsp,tt);
|
tglobalvarsym(self).create(n,vsp,tt,[vo_is_dll_var]);
|
||||||
include(varoptions,vo_is_dll_var);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tglobalvarsym.create_C(const n,mangled : string;vsp:tvarspez;const tt : ttype);
|
constructor tglobalvarsym.create_C(const n,mangled : string;vsp:tvarspez;const tt : ttype);
|
||||||
begin
|
begin
|
||||||
tglobalvarsym(self).create(n,vsp,tt);
|
tglobalvarsym(self).create(n,vsp,tt,[]);
|
||||||
set_mangledname(mangled);
|
set_mangledname(mangled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1640,9 +1637,9 @@ implementation
|
|||||||
TLOCALVARSYM
|
TLOCALVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tlocalvarsym.create(const n : string;vsp:tvarspez;const tt : ttype);
|
constructor tlocalvarsym.create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vsp,tt);
|
inherited create(n,vsp,tt,vopts);
|
||||||
typ:=localvarsym;
|
typ:=localvarsym;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1701,9 +1698,9 @@ implementation
|
|||||||
TPARAVARSYM
|
TPARAVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;const tt : ttype);
|
constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vsp,tt);
|
inherited create(n,vsp,tt,vopts);
|
||||||
typ:=paravarsym;
|
typ:=paravarsym;
|
||||||
paranr:=nr;
|
paranr:=nr;
|
||||||
paraloc[calleeside].init;
|
paraloc[calleeside].init;
|
||||||
@ -1838,7 +1835,7 @@ implementation
|
|||||||
|
|
||||||
constructor tabsolutevarsym.create(const n : string;const tt : ttype);
|
constructor tabsolutevarsym.create(const n : string;const tt : ttype);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vs_value,tt);
|
inherited create(n,vs_value,tt,[]);
|
||||||
typ:=absolutevarsym;
|
typ:=absolutevarsym;
|
||||||
ref:=nil;
|
ref:=nil;
|
||||||
end;
|
end;
|
||||||
@ -1846,7 +1843,7 @@ implementation
|
|||||||
|
|
||||||
constructor tabsolutevarsym.create_ref(const n : string;const tt : ttype;_ref:tsymlist);
|
constructor tabsolutevarsym.create_ref(const n : string;const tt : ttype;_ref:tsymlist);
|
||||||
begin
|
begin
|
||||||
inherited create(n,vs_value,tt);
|
inherited create(n,vs_value,tt,[]);
|
||||||
typ:=absolutevarsym;
|
typ:=absolutevarsym;
|
||||||
ref:=_ref;
|
ref:=_ref;
|
||||||
end;
|
end;
|
||||||
@ -2557,7 +2554,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.195 2004-11-29 20:50:37 peter
|
Revision 1.196 2004-12-07 16:11:52 peter
|
||||||
|
* set vo_explicit_paraloc flag
|
||||||
|
|
||||||
|
Revision 1.195 2004/11/29 20:50:37 peter
|
||||||
* uninited results
|
* uninited results
|
||||||
|
|
||||||
Revision 1.194 2004/11/17 22:21:35 peter
|
Revision 1.194 2004/11/17 22:21:35 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user