mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 07:01:44 +02:00
* Make Tprocdef.defs protected
This commit is contained in:
parent
64c4be5ca9
commit
b0364566d1
@ -1017,9 +1017,9 @@ Begin
|
|||||||
hs:=ttypedconstsym(sym).mangledname;
|
hs:=ttypedconstsym(sym).mangledname;
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(sym).defs^.next) then
|
if Tprocsym(sym).procdef_count>1 then
|
||||||
Message(asmr_w_calling_overload_func);
|
Message(asmr_w_calling_overload_func);
|
||||||
hs:=tprocsym(sym).defs^.def.mangledname;
|
hs:=tprocsym(sym).first_procdef.mangledname;
|
||||||
end;
|
end;
|
||||||
typesym :
|
typesym :
|
||||||
begin
|
begin
|
||||||
@ -2129,7 +2129,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.30 2002-08-13 18:01:52 carl
|
Revision 1.31 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.30 2002/08/13 18:01:52 carl
|
||||||
* rename swatoperands to swapoperands
|
* rename swatoperands to swapoperands
|
||||||
+ m68k first compilable version (still needs a lot of testing):
|
+ m68k first compilable version (still needs a lot of testing):
|
||||||
assembler generator, system information , inline
|
assembler generator, system information , inline
|
||||||
|
|||||||
@ -904,9 +904,9 @@ Begin
|
|||||||
hs:=ttypedconstsym(sym).mangledname;
|
hs:=ttypedconstsym(sym).mangledname;
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(sym).defs^.next) then
|
if Tprocsym(sym).procdef_count>1 then
|
||||||
Message(asmr_w_calling_overload_func);
|
Message(asmr_w_calling_overload_func);
|
||||||
hs:=tprocsym(sym).defs^.def.mangledname;
|
hs:=tprocsym(sym).first_procdef.mangledname;
|
||||||
end;
|
end;
|
||||||
typesym :
|
typesym :
|
||||||
begin
|
begin
|
||||||
@ -1959,7 +1959,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.33 2002-08-17 09:23:47 florian
|
Revision 1.34 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.33 2002/08/17 09:23:47 florian
|
||||||
* first part of procinfo rewrite
|
* first part of procinfo rewrite
|
||||||
|
|
||||||
Revision 1.32 2002/08/13 18:01:52 carl
|
Revision 1.32 2002/08/13 18:01:52 carl
|
||||||
|
|||||||
@ -177,7 +177,7 @@ interface
|
|||||||
if (sym.typ=procsym) and ((pos('CALL',upper(s))>0) or
|
if (sym.typ=procsym) and ((pos('CALL',upper(s))>0) or
|
||||||
(pos('LEA',upper(s))>0)) then
|
(pos('LEA',upper(s))>0)) then
|
||||||
begin
|
begin
|
||||||
hs:=tprocsym(sym).defs^.def.mangledname;
|
hs:=tprocsym(sym).first_procdef.mangledname;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -225,10 +225,10 @@ interface
|
|||||||
{ procs can be called or the address can be loaded }
|
{ procs can be called or the address can be loaded }
|
||||||
if ((pos('CALL',upper(s))>0) or (pos('LEA',upper(s))>0)) then
|
if ((pos('CALL',upper(s))>0) or (pos('LEA',upper(s))>0)) then
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(sym).defs^.def) then
|
if tprocsym(sym).procdef_count>1 then
|
||||||
Message1(asmr_w_direct_global_is_overloaded_func,hs);
|
Message1(asmr_w_direct_global_is_overloaded_func,hs);
|
||||||
Message2(asmr_h_direct_global_to_mangled,hs,tprocsym(sym).defs^.def.mangledname);
|
Message2(asmr_h_direct_global_to_mangled,hs,tprocsym(sym).first_procdef.mangledname);
|
||||||
hs:=tprocsym(sym).defs^.def.mangledname;
|
hs:=tprocsym(sym).first_procdef.mangledname;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
@ -304,7 +304,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2002-08-17 09:23:47 florian
|
Revision 1.3 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.2 2002/08/17 09:23:47 florian
|
||||||
* first part of procinfo rewrite
|
* first part of procinfo rewrite
|
||||||
|
|
||||||
Revision 1.1 2002/08/10 14:47:50 carl
|
Revision 1.1 2002/08/10 14:47:50 carl
|
||||||
|
|||||||
@ -966,7 +966,7 @@ implementation
|
|||||||
repeat
|
repeat
|
||||||
for i:=1 to srprocsym.procdef_count do
|
for i:=1 to srprocsym.procdef_count do
|
||||||
begin
|
begin
|
||||||
def:=srprocsym.procdef(i);
|
def:=srprocsym.procdef[i];
|
||||||
{ only when the # of parameters are supported by the procedure }
|
{ only when the # of parameters are supported by the procedure }
|
||||||
if (paralength>=def.minparacount) and
|
if (paralength>=def.minparacount) and
|
||||||
((po_varargs in def.procoptions) or (paralength<=def.maxparacount)) then
|
((po_varargs in def.procoptions) or (paralength<=def.maxparacount)) then
|
||||||
@ -2595,7 +2595,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.92 2002-09-01 13:28:37 daniel
|
Revision 1.93 2002-09-03 16:26:26 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.92 2002/09/01 13:28:37 daniel
|
||||||
- write_access fields removed in favor of a flag
|
- write_access fields removed in favor of a flag
|
||||||
|
|
||||||
Revision 1.91 2002/09/01 12:14:15 peter
|
Revision 1.91 2002/09/01 12:14:15 peter
|
||||||
|
|||||||
@ -312,9 +312,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if not assigned(procdef) then
|
if not assigned(procdef) then
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(symtableentry).defs^.next) then
|
if Tprocsym(symtableentry).procdef_count>1 then
|
||||||
CGMessage(parser_e_no_overloaded_procvars);
|
CGMessage(parser_e_no_overloaded_procvars);
|
||||||
resulttype.setdef(tprocsym(symtableentry).defs^.def);
|
resulttype.setdef(tprocsym(symtableentry).first_procdef);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
resulttype.setdef(procdef);
|
resulttype.setdef(procdef);
|
||||||
@ -1143,7 +1143,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.56 2002-09-01 13:28:37 daniel
|
Revision 1.57 2002-09-03 16:26:26 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.56 2002/09/01 13:28:37 daniel
|
||||||
- write_access fields removed in favor of a flag
|
- write_access fields removed in favor of a flag
|
||||||
|
|
||||||
Revision 1.55 2002/09/01 08:01:16 daniel
|
Revision 1.55 2002/09/01 08:01:16 daniel
|
||||||
|
|||||||
@ -430,7 +430,7 @@ implementation
|
|||||||
function tunaryminusnode.det_resulttype : tnode;
|
function tunaryminusnode.det_resulttype : tnode;
|
||||||
var
|
var
|
||||||
t : tnode;
|
t : tnode;
|
||||||
minusdef : pprocdeflist;
|
minusdef : Tprocdef;
|
||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
resulttypepass(left);
|
resulttypepass(left);
|
||||||
@ -481,22 +481,16 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
minusdef:=nil;
|
||||||
if assigned(overloaded_operators[_minus]) then
|
if assigned(overloaded_operators[_minus]) then
|
||||||
minusdef:=overloaded_operators[_minus].defs
|
minusdef:=overloaded_operators[_minus].search_procdef_by1paradef(left.resulttype.def);
|
||||||
else
|
if minusdef<>nil then
|
||||||
minusdef:=nil;
|
|
||||||
while assigned(minusdef) do
|
|
||||||
begin
|
begin
|
||||||
if is_equal(tparaitem(minusdef^.def.para.first).paratype.def,left.resulttype.def) and
|
t:=ccallnode.create(ccallparanode.create(left,nil),
|
||||||
(tparaitem(minusdef^.def.para.first).next=nil) then
|
overloaded_operators[_minus],nil,nil);
|
||||||
begin
|
left:=nil;
|
||||||
t:=ccallnode.create(ccallparanode.create(left,nil),
|
result:=t;
|
||||||
overloaded_operators[_minus],nil,nil);
|
exit;
|
||||||
left:=nil;
|
|
||||||
result:=t;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
minusdef:=minusdef^.next;
|
|
||||||
end;
|
end;
|
||||||
CGMessage(type_e_mismatch);
|
CGMessage(type_e_mismatch);
|
||||||
end;
|
end;
|
||||||
@ -567,7 +561,7 @@ implementation
|
|||||||
function tnotnode.det_resulttype : tnode;
|
function tnotnode.det_resulttype : tnode;
|
||||||
var
|
var
|
||||||
t : tnode;
|
t : tnode;
|
||||||
notdef : pprocdeflist;
|
notdef : Tprocdef;
|
||||||
v : tconstexprint;
|
v : tconstexprint;
|
||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
@ -660,22 +654,16 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
notdef:=nil;
|
||||||
if assigned(overloaded_operators[_op_not]) then
|
if assigned(overloaded_operators[_op_not]) then
|
||||||
notdef:=overloaded_operators[_op_not].defs
|
notdef:=overloaded_operators[_op_not].search_procdef_by1paradef(left.resulttype.def);
|
||||||
else
|
if notdef<>nil then
|
||||||
notdef:=nil;
|
|
||||||
while assigned(notdef) do
|
|
||||||
begin
|
begin
|
||||||
if is_equal(tparaitem(notdef^.def.para.first).paratype.def,left.resulttype.def) and
|
t:=ccallnode.create(ccallparanode.create(left,nil),
|
||||||
(tparaitem(notdef^.def.para.first).next=nil) then
|
overloaded_operators[_op_not],nil,nil);
|
||||||
begin
|
left:=nil;
|
||||||
t:=ccallnode.create(ccallparanode.create(left,nil),
|
result:=t;
|
||||||
overloaded_operators[_op_not],nil,nil);
|
exit;
|
||||||
left:=nil;
|
|
||||||
result:=t;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
notdef:=notdef^.next;
|
|
||||||
end;
|
end;
|
||||||
CGMessage(type_e_mismatch);
|
CGMessage(type_e_mismatch);
|
||||||
end;
|
end;
|
||||||
@ -759,7 +747,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.40 2002-08-25 11:32:33 peter
|
Revision 1.41 2002-09-03 16:26:26 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.40 2002/08/25 11:32:33 peter
|
||||||
* don't optimize not([lten,gten]) for setdefs
|
* don't optimize not([lten,gten]) for setdefs
|
||||||
|
|
||||||
Revision 1.39 2002/08/25 09:10:58 peter
|
Revision 1.39 2002/08/25 09:10:58 peter
|
||||||
|
|||||||
@ -224,50 +224,47 @@ implementation
|
|||||||
procedure tclassheader.insertmsgint(p : tnamedindexitem;arg:pointer);
|
procedure tclassheader.insertmsgint(p : tnamedindexitem;arg:pointer);
|
||||||
|
|
||||||
var
|
var
|
||||||
hp : pprocdeflist;
|
i : cardinal;
|
||||||
|
def: Tprocdef;
|
||||||
pt : pprocdeftree;
|
pt : pprocdeftree;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if tsym(p).typ=procsym then
|
if tsym(p).typ=procsym then
|
||||||
begin
|
for i:=1 to Tprocsym(p).procdef_count do
|
||||||
hp:=tprocsym(p).defs;
|
begin
|
||||||
while assigned(hp) do
|
def:=Tprocsym(p).procdef[i];
|
||||||
begin
|
if po_msgint in def.procoptions then
|
||||||
if (po_msgint in hp^.def.procoptions) then
|
begin
|
||||||
begin
|
new(pt);
|
||||||
new(pt);
|
pt^.data:=def;
|
||||||
pt^.data:=hp^.def;
|
pt^.l:=nil;
|
||||||
pt^.l:=nil;
|
pt^.r:=nil;
|
||||||
pt^.r:=nil;
|
insertint(pt,root);
|
||||||
insertint(pt,root);
|
end;
|
||||||
end;
|
end;
|
||||||
hp:=hp^.next;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tclassheader.insertmsgstr(p : tnamedindexitem;arg:pointer);
|
procedure tclassheader.insertmsgstr(p : tnamedindexitem;arg:pointer);
|
||||||
|
|
||||||
var
|
var
|
||||||
hp : pprocdeflist;
|
i : cardinal;
|
||||||
|
def: Tprocdef;
|
||||||
pt : pprocdeftree;
|
pt : pprocdeftree;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if tsym(p).typ=procsym then
|
if tsym(p).typ=procsym then
|
||||||
begin
|
for i:=1 to Tprocsym(p).procdef_count do
|
||||||
hp:=tprocsym(p).defs;
|
begin
|
||||||
while assigned(hp) do
|
def:=Tprocsym(p).procdef[i];
|
||||||
begin
|
if po_msgint in def.procoptions then
|
||||||
if (po_msgstr in hp^.def.procoptions) then
|
begin
|
||||||
begin
|
new(pt);
|
||||||
new(pt);
|
pt^.data:=def;
|
||||||
pt^.data:=hp^.def;
|
pt^.l:=nil;
|
||||||
pt^.l:=nil;
|
pt^.r:=nil;
|
||||||
pt^.r:=nil;
|
insertstr(pt,root);
|
||||||
insertstr(pt,root);
|
end;
|
||||||
end;
|
end;
|
||||||
hp:=hp^.next;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tclassheader.writenames(p : pprocdeftree);
|
procedure tclassheader.writenames(p : pprocdeftree);
|
||||||
@ -463,9 +460,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if (tsym(p).typ=procsym) and (sp_published in tsym(p).symoptions) then
|
if (tsym(p).typ=procsym) and (sp_published in tsym(p).symoptions) then
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(p).defs^.next) then
|
if Tprocsym(p).procdef_count>1 then
|
||||||
internalerror(1209992);
|
internalerror(1209992);
|
||||||
hp:=tprocsym(p).defs^.def;
|
hp:=tprocsym(p).first_procdef;
|
||||||
objectlibrary.getdatalabel(l);
|
objectlibrary.getdatalabel(l);
|
||||||
|
|
||||||
Consts.concat(Tai_label.Create(l));
|
Consts.concat(Tai_label.Create(l));
|
||||||
@ -539,6 +536,9 @@ implementation
|
|||||||
|
|
||||||
{ creates a new entry in the procsym list }
|
{ creates a new entry in the procsym list }
|
||||||
procedure newentry;
|
procedure newentry;
|
||||||
|
|
||||||
|
var i:cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{ if not, generate a new symbol item }
|
{ if not, generate a new symbol item }
|
||||||
new(symcoll);
|
new(symcoll);
|
||||||
@ -548,18 +548,15 @@ implementation
|
|||||||
wurzel:=symcoll;
|
wurzel:=symcoll;
|
||||||
|
|
||||||
{ inserts all definitions }
|
{ inserts all definitions }
|
||||||
hp:=tprocsym(sym).defs;
|
for i:=1 to Tprocsym(sym).procdef_count do
|
||||||
while assigned(hp) do
|
newdefentry(Tprocsym(sym).procdef[i]);
|
||||||
begin
|
|
||||||
newdefentry(hp^.def);
|
|
||||||
hp:=hp^.next;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
label
|
label
|
||||||
handlenextdef;
|
handlenextdef;
|
||||||
var
|
var
|
||||||
pd : tprocdef;
|
pd : tprocdef;
|
||||||
|
i : cardinal;
|
||||||
is_visible,
|
is_visible,
|
||||||
pdoverload : boolean;
|
pdoverload : boolean;
|
||||||
begin
|
begin
|
||||||
@ -584,10 +581,9 @@ implementation
|
|||||||
if _name=symcoll^.name^ then
|
if _name=symcoll^.name^ then
|
||||||
begin
|
begin
|
||||||
{ walk through all defs of the symbol }
|
{ walk through all defs of the symbol }
|
||||||
hp:=tprocsym(sym).defs;
|
for i:=1 to Tprocsym(sym).procdef_count do
|
||||||
while assigned(hp) do
|
begin
|
||||||
begin
|
pd:=Tprocsym(sym).procdef[i];
|
||||||
pd:=hp^.def;
|
|
||||||
if pd.procsym=sym then
|
if pd.procsym=sym then
|
||||||
begin
|
begin
|
||||||
pdoverload:=(po_overload in pd.procoptions);
|
pdoverload:=(po_overload in pd.procoptions);
|
||||||
@ -719,7 +715,6 @@ implementation
|
|||||||
newdefentry(pd);
|
newdefentry(pd);
|
||||||
end;
|
end;
|
||||||
handlenextdef:
|
handlenextdef:
|
||||||
hp:=hp^.next;
|
|
||||||
end;
|
end;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -998,24 +993,22 @@ implementation
|
|||||||
function tclassheader.gintfgetcprocdef(proc: tprocdef;const name: string): tprocdef;
|
function tclassheader.gintfgetcprocdef(proc: tprocdef;const name: string): tprocdef;
|
||||||
var
|
var
|
||||||
sym: tprocsym;
|
sym: tprocsym;
|
||||||
implprocdef : pprocdeflist;
|
implprocdef : Tprocdef;
|
||||||
|
i: cardinal;
|
||||||
begin
|
begin
|
||||||
gintfgetcprocdef:=nil;
|
gintfgetcprocdef:=nil;
|
||||||
sym:=tprocsym(search_class_member(_class,name));
|
sym:=tprocsym(search_class_member(_class,name));
|
||||||
if assigned(sym) and (sym.typ=procsym) then
|
if assigned(sym) and (sym.typ=procsym) then
|
||||||
begin
|
for i:=1 to sym.procdef_count do
|
||||||
implprocdef:=sym.defs;
|
begin
|
||||||
while assigned(implprocdef) do
|
implprocdef:=sym.procdef[i];
|
||||||
begin
|
if equal_paras(proc.para,implprocdef.para,cp_none) and
|
||||||
if equal_paras(proc.para,implprocdef^.def.para,cp_none) and
|
(proc.proccalloption=implprocdef.proccalloption) then
|
||||||
(proc.proccalloption=implprocdef^.def.proccalloption) then
|
|
||||||
begin
|
begin
|
||||||
gintfgetcprocdef:=implprocdef^.def;
|
gintfgetcprocdef:=implprocdef;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
implprocdef:=implprocdef^.next;
|
end;
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1308,7 +1301,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.26 2002-09-03 15:44:44 peter
|
Revision 1.27 2002-09-03 16:26:26 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.26 2002/09/03 15:44:44 peter
|
||||||
* fixed private methods hiding public virtual methods
|
* fixed private methods hiding public virtual methods
|
||||||
|
|
||||||
Revision 1.25 2002/08/11 14:32:27 peter
|
Revision 1.25 2002/08/11 14:32:27 peter
|
||||||
|
|||||||
@ -342,7 +342,7 @@ interface
|
|||||||
{$ifdef var_notification}
|
{$ifdef var_notification}
|
||||||
{ For a t1:=t2 tree, mark the part of the tree t1 that gets
|
{ For a t1:=t2 tree, mark the part of the tree t1 that gets
|
||||||
written to (normally the loadnode) as write access. }
|
written to (normally the loadnode) as write access. }
|
||||||
procedure mark_write;virtual;
|
procedure mark_write;virtual;abstract;
|
||||||
{$endif}
|
{$endif}
|
||||||
procedure det_temp;virtual;abstract;
|
procedure det_temp;virtual;abstract;
|
||||||
|
|
||||||
@ -719,17 +719,6 @@ implementation
|
|||||||
fileinfo:=filepos;
|
fileinfo:=filepos;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef var_notification}
|
|
||||||
{ For a t1:=t2 tree, mark the part of the tree t1 that gets
|
|
||||||
written to (normally the loadnode) as write access. }
|
|
||||||
procedure Tnode.mark_write;
|
|
||||||
begin
|
|
||||||
writenode(self);
|
|
||||||
runerror(211);
|
|
||||||
end;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TUNARYNODE
|
TUNARYNODE
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
@ -989,7 +978,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.41 2002-09-01 13:28:38 daniel
|
Revision 1.42 2002-09-03 16:26:26 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.41 2002/09/01 13:28:38 daniel
|
||||||
- write_access fields removed in favor of a flag
|
- write_access fields removed in favor of a flag
|
||||||
|
|
||||||
Revision 1.40 2002/09/01 08:01:16 daniel
|
Revision 1.40 2002/09/01 08:01:16 daniel
|
||||||
|
|||||||
@ -196,10 +196,10 @@ implementation
|
|||||||
|
|
||||||
var
|
var
|
||||||
sym : tsym;
|
sym : tsym;
|
||||||
propertyparas : tlinkedlist;
|
propertyparas : tparalinkedlist;
|
||||||
|
|
||||||
{ returns the matching procedure to access a property }
|
{ returns the matching procedure to access a property }
|
||||||
function get_procdef : tprocdef;
|
{ function get_procdef : tprocdef;
|
||||||
var
|
var
|
||||||
p : pprocdeflist;
|
p : pprocdeflist;
|
||||||
begin
|
begin
|
||||||
@ -215,7 +215,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
p:=p^.next;
|
p:=p^.next;
|
||||||
end;
|
end;
|
||||||
end;
|
end;}
|
||||||
|
|
||||||
var
|
var
|
||||||
hp2,datacoll : tparaitem;
|
hp2,datacoll : tparaitem;
|
||||||
@ -227,7 +227,7 @@ implementation
|
|||||||
s : string;
|
s : string;
|
||||||
tt : ttype;
|
tt : ttype;
|
||||||
declarepos : tfileposinfo;
|
declarepos : tfileposinfo;
|
||||||
pp : pprocdeflist;
|
pp : Tprocdef;
|
||||||
pd : tprocdef;
|
pd : tprocdef;
|
||||||
pt : tnode;
|
pt : tnode;
|
||||||
propname : stringid;
|
propname : stringid;
|
||||||
@ -385,7 +385,7 @@ implementation
|
|||||||
case sym.typ of
|
case sym.typ of
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
pd:=get_procdef;
|
pd:=Tprocsym(sym).search_procdef_bypara(propertyparas,true);
|
||||||
if not(assigned(pd)) or
|
if not(assigned(pd)) or
|
||||||
not(is_equal(pd.rettype.def,p.proptype.def)) then
|
not(is_equal(pd.rettype.def,p.proptype.def)) then
|
||||||
Message(parser_e_ill_property_access_sym);
|
Message(parser_e_ill_property_access_sym);
|
||||||
@ -420,7 +420,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ insert data entry to check access method }
|
{ insert data entry to check access method }
|
||||||
propertyparas.insert(datacoll);
|
propertyparas.insert(datacoll);
|
||||||
pd:=get_procdef;
|
pd:=Tprocsym(sym).search_procdef_bypara(propertyparas,true);
|
||||||
{ ... and remove it }
|
{ ... and remove it }
|
||||||
propertyparas.remove(datacoll);
|
propertyparas.remove(datacoll);
|
||||||
if not(assigned(pd)) then
|
if not(assigned(pd)) then
|
||||||
@ -464,20 +464,11 @@ implementation
|
|||||||
case sym.typ of
|
case sym.typ of
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
pp:=tprocsym(sym).defs;
|
pp:=Tprocsym(sym).search_procdef_nopara_boolret;
|
||||||
while assigned(pp) do
|
if assigned(pp) then
|
||||||
begin
|
p.storedaccess.setdef(pp)
|
||||||
{ the stored function shouldn't have any parameters }
|
else
|
||||||
if pp^.def.Para.empty then
|
message(parser_e_ill_property_storage_sym);
|
||||||
break;
|
|
||||||
pp:=pp^.next;
|
|
||||||
end;
|
|
||||||
{ found we a procedure and does it really return a bool? }
|
|
||||||
if assigned(pp) and
|
|
||||||
is_boolean(pp^.def.rettype.def) then
|
|
||||||
p.storedaccess.setdef(pp^.def)
|
|
||||||
else
|
|
||||||
Message(parser_e_ill_property_storage_sym);
|
|
||||||
end;
|
end;
|
||||||
varsym :
|
varsym :
|
||||||
begin
|
begin
|
||||||
@ -536,9 +527,8 @@ implementation
|
|||||||
symtablestack.insert(p);
|
symtablestack.insert(p);
|
||||||
{ default property ? }
|
{ default property ? }
|
||||||
consume(_SEMICOLON);
|
consume(_SEMICOLON);
|
||||||
if (idtoken=_DEFAULT) then
|
if try_to_consume(_DEFAULT) then
|
||||||
begin
|
begin
|
||||||
consume(_DEFAULT);
|
|
||||||
{ overriding a default propertyp is allowed
|
{ overriding a default propertyp is allowed
|
||||||
p2:=search_default_property(aktclass);
|
p2:=search_default_property(aktclass);
|
||||||
if assigned(p2) then
|
if assigned(p2) then
|
||||||
@ -1157,7 +1147,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.49 2002-08-17 09:23:38 florian
|
Revision 1.50 2002-09-03 16:26:26 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.49 2002/08/17 09:23:38 florian
|
||||||
* first part of procinfo rewrite
|
* first part of procinfo rewrite
|
||||||
|
|
||||||
Revision 1.48 2002/08/09 07:33:02 florian
|
Revision 1.48 2002/08/09 07:33:02 florian
|
||||||
|
|||||||
@ -524,16 +524,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ create the procsym with saving the original case }
|
{ create the procsym with saving the original case }
|
||||||
aktprocsym:=tprocsym.create('$'+sp);
|
aktprocsym:=tprocsym.create('$'+sp);
|
||||||
{ add already known overloaded defs }
|
|
||||||
if assigned(overloaded_operators[optoken]) then
|
if assigned(overloaded_operators[optoken]) then
|
||||||
begin
|
overloaded_operators[optoken].concat_procdefs_to(aktprocsym);
|
||||||
pdl:=overloaded_operators[optoken].defs;
|
|
||||||
while assigned(pdl) do
|
|
||||||
begin
|
|
||||||
aktprocsym.addprocdef(pdl^.def);
|
|
||||||
pdl:=pdl^.next;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1741,17 +1733,16 @@ const
|
|||||||
}
|
}
|
||||||
var
|
var
|
||||||
hd : tprocdef;
|
hd : tprocdef;
|
||||||
pdl : pprocdeflist;
|
|
||||||
ad,fd : tsym;
|
ad,fd : tsym;
|
||||||
forwardfound : boolean;
|
forwardfound : boolean;
|
||||||
|
i : cardinal;
|
||||||
begin
|
begin
|
||||||
forwardfound:=false;
|
forwardfound:=false;
|
||||||
|
|
||||||
{ check overloaded functions if the same function already exists }
|
{ check overloaded functions if the same function already exists }
|
||||||
pdl:=aprocsym.defs;
|
for i:=1 to aprocsym.procdef_count do
|
||||||
while assigned(pdl) do
|
|
||||||
begin
|
begin
|
||||||
hd:=pdl^.def;
|
hd:=aprocsym.procdef[i];
|
||||||
|
|
||||||
{ check the parameters, for delphi/tp it is possible to
|
{ check the parameters, for delphi/tp it is possible to
|
||||||
leave the parameters away in the implementation (forwarddef=false).
|
leave the parameters away in the implementation (forwarddef=false).
|
||||||
@ -1939,9 +1930,6 @@ const
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end; { equal arguments }
|
end; { equal arguments }
|
||||||
|
|
||||||
{ try next overloaded }
|
|
||||||
pdl:=pdl^.next;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ if we didn't reuse a forwarddef then we add the procdef to the overloaded
|
{ if we didn't reuse a forwarddef then we add the procdef to the overloaded
|
||||||
@ -1988,7 +1976,10 @@ const
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.69 2002-09-01 12:11:33 peter
|
Revision 1.70 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.69 2002/09/01 12:11:33 peter
|
||||||
* calc param_offset after parameters are read, because the calculation
|
* calc param_offset after parameters are read, because the calculation
|
||||||
depends on po_containself
|
depends on po_containself
|
||||||
|
|
||||||
|
|||||||
@ -64,106 +64,98 @@ implementation
|
|||||||
DefString:='';
|
DefString:='';
|
||||||
InternalProcName:='';
|
InternalProcName:='';
|
||||||
consume(_EXPORTS);
|
consume(_EXPORTS);
|
||||||
while true do
|
repeat
|
||||||
begin
|
hp:=texported_item.create;
|
||||||
hp:=texported_item.create;
|
if token=_ID then
|
||||||
if token=_ID then
|
begin
|
||||||
begin
|
orgs:=orgpattern;
|
||||||
orgs:=orgpattern;
|
consume_sym(srsym,srsymtable);
|
||||||
consume_sym(srsym,srsymtable);
|
hp.sym:=srsym;
|
||||||
hp.sym:=srsym;
|
InternalProcName:='';
|
||||||
InternalProcName:='';
|
case srsym.typ of
|
||||||
case srsym.typ of
|
varsym :
|
||||||
varsym :
|
InternalProcName:=tvarsym(srsym).mangledname;
|
||||||
InternalProcName:=tvarsym(srsym).mangledname;
|
typedconstsym :
|
||||||
typedconstsym :
|
InternalProcName:=ttypedconstsym(srsym).mangledname;
|
||||||
InternalProcName:=ttypedconstsym(srsym).mangledname;
|
procsym :
|
||||||
procsym :
|
|
||||||
begin
|
|
||||||
if assigned(tprocsym(srsym).defs^.next) or
|
|
||||||
((tf_need_export in target_info.flags) and
|
|
||||||
not(po_exports in tprocsym(srsym).defs^.def.procoptions)) then
|
|
||||||
Message(parser_e_illegal_symbol_exported)
|
|
||||||
else
|
|
||||||
InternalProcName:=tprocsym(srsym).defs^.def.mangledname;
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
Message(parser_e_illegal_symbol_exported)
|
|
||||||
end;
|
|
||||||
if InternalProcName<>'' then
|
|
||||||
begin
|
begin
|
||||||
{ This is wrong if the first is not
|
if (Tprocsym(srsym).procdef_count>1) or
|
||||||
an underline }
|
((tf_need_export in target_info.flags) and
|
||||||
if InternalProcName[1]='_' then
|
not(po_exports in tprocsym(srsym).first_procdef.procoptions)) then
|
||||||
delete(InternalProcName,1,1)
|
Message(parser_e_illegal_symbol_exported)
|
||||||
else if (target_info.system in [system_i386_win32,system_i386_wdosx]) and UseDeffileForExport then
|
|
||||||
begin
|
|
||||||
Message(parser_e_dlltool_unit_var_problem);
|
|
||||||
Message(parser_e_dlltool_unit_var_problem2);
|
|
||||||
end;
|
|
||||||
if length(InternalProcName)<2 then
|
|
||||||
Message(parser_e_procname_to_short_for_export);
|
|
||||||
DefString:=srsym.realname+'='+InternalProcName;
|
|
||||||
end;
|
|
||||||
if (idtoken=_INDEX) then
|
|
||||||
begin
|
|
||||||
consume(_INDEX);
|
|
||||||
pt:=comp_expr(true);
|
|
||||||
if pt.nodetype=ordconstn then
|
|
||||||
hp.index:=tordconstnode(pt).value
|
|
||||||
else
|
else
|
||||||
begin
|
InternalProcName:=tprocsym(srsym).first_procdef.mangledname;
|
||||||
hp.index:=0;
|
|
||||||
consume(_INTCONST);
|
|
||||||
end;
|
|
||||||
hp.options:=hp.options or eo_index;
|
|
||||||
pt.free;
|
|
||||||
if target_info.system in [system_i386_win32,system_i386_wdosx] then
|
|
||||||
DefString:=srsym.realname+'='+InternalProcName+' @ '+tostr(hp.index)
|
|
||||||
else
|
|
||||||
DefString:=srsym.realname+'='+InternalProcName; {Index ignored!}
|
|
||||||
end;
|
end;
|
||||||
if (idtoken=_NAME) then
|
else
|
||||||
begin
|
Message(parser_e_illegal_symbol_exported)
|
||||||
consume(_NAME);
|
end;
|
||||||
pt:=comp_expr(true);
|
if InternalProcName<>'' then
|
||||||
if pt.nodetype=stringconstn then
|
begin
|
||||||
hp.name:=stringdup(strpas(tstringconstnode(pt).value_str))
|
{ This is wrong if the first is not
|
||||||
else
|
an underline }
|
||||||
begin
|
if InternalProcName[1]='_' then
|
||||||
hp.name:=stringdup('');
|
delete(InternalProcName,1,1)
|
||||||
consume(_CSTRING);
|
else if (target_info.system in [system_i386_win32,system_i386_wdosx]) and UseDeffileForExport then
|
||||||
end;
|
begin
|
||||||
hp.options:=hp.options or eo_name;
|
Message(parser_e_dlltool_unit_var_problem);
|
||||||
pt.free;
|
Message(parser_e_dlltool_unit_var_problem2);
|
||||||
DefString:=hp.name^+'='+InternalProcName;
|
end;
|
||||||
end;
|
if length(InternalProcName)<2 then
|
||||||
if (idtoken=_RESIDENT) then
|
Message(parser_e_procname_to_short_for_export);
|
||||||
begin
|
DefString:=srsym.realname+'='+InternalProcName;
|
||||||
consume(_RESIDENT);
|
end;
|
||||||
hp.options:=hp.options or eo_resident;
|
if try_to_consume(_INDEX) then
|
||||||
DefString:=srsym.realname+'='+InternalProcName;{Resident ignored!}
|
begin
|
||||||
end;
|
pt:=comp_expr(true);
|
||||||
if (DefString<>'') and UseDeffileForExport then
|
if pt.nodetype=ordconstn then
|
||||||
DefFile.AddExport(DefString);
|
hp.index:=tordconstnode(pt).value
|
||||||
{ Default to generate a name entry with the provided name }
|
|
||||||
if not assigned(hp.name) then
|
|
||||||
begin
|
|
||||||
hp.name:=stringdup(orgs);
|
|
||||||
hp.options:=hp.options or eo_name;
|
|
||||||
end;
|
|
||||||
if hp.sym.typ=procsym then
|
|
||||||
exportlib.exportprocedure(hp)
|
|
||||||
else
|
else
|
||||||
exportlib.exportvar(hp);
|
begin
|
||||||
end
|
hp.index:=0;
|
||||||
else
|
consume(_INTCONST);
|
||||||
consume(_ID);
|
end;
|
||||||
if token=_COMMA then
|
hp.options:=hp.options or eo_index;
|
||||||
consume(_COMMA)
|
pt.free;
|
||||||
else
|
if target_info.system in [system_i386_win32,system_i386_wdosx] then
|
||||||
break;
|
DefString:=srsym.realname+'='+InternalProcName+' @ '+tostr(hp.index)
|
||||||
end;
|
else
|
||||||
|
DefString:=srsym.realname+'='+InternalProcName; {Index ignored!}
|
||||||
|
end;
|
||||||
|
if try_to_consume(_NAME) then
|
||||||
|
begin
|
||||||
|
pt:=comp_expr(true);
|
||||||
|
if pt.nodetype=stringconstn then
|
||||||
|
hp.name:=stringdup(strpas(tstringconstnode(pt).value_str))
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
hp.name:=stringdup('');
|
||||||
|
consume(_CSTRING);
|
||||||
|
end;
|
||||||
|
hp.options:=hp.options or eo_name;
|
||||||
|
pt.free;
|
||||||
|
DefString:=hp.name^+'='+InternalProcName;
|
||||||
|
end;
|
||||||
|
if try_to_consume(_RESIDENT) then
|
||||||
|
begin
|
||||||
|
hp.options:=hp.options or eo_resident;
|
||||||
|
DefString:=srsym.realname+'='+InternalProcName;{Resident ignored!}
|
||||||
|
end;
|
||||||
|
if (DefString<>'') and UseDeffileForExport then
|
||||||
|
DefFile.AddExport(DefString);
|
||||||
|
{ Default to generate a name entry with the provided name }
|
||||||
|
if not assigned(hp.name) then
|
||||||
|
begin
|
||||||
|
hp.name:=stringdup(orgs);
|
||||||
|
hp.options:=hp.options or eo_name;
|
||||||
|
end;
|
||||||
|
if hp.sym.typ=procsym then
|
||||||
|
exportlib.exportprocedure(hp)
|
||||||
|
else
|
||||||
|
exportlib.exportvar(hp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
consume(_ID);
|
||||||
|
until not try_to_consume(_COMMA);
|
||||||
consume(_SEMICOLON);
|
consume(_SEMICOLON);
|
||||||
if not DefFile.empty then
|
if not DefFile.empty then
|
||||||
DefFile.writefile;
|
DefFile.writefile;
|
||||||
@ -173,7 +165,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.22 2002-07-26 21:15:41 florian
|
Revision 1.23 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.22 2002/07/26 21:15:41 florian
|
||||||
* rewrote the system handling
|
* rewrote the system handling
|
||||||
|
|
||||||
Revision 1.21 2002/05/18 13:34:12 peter
|
Revision 1.21 2002/05/18 13:34:12 peter
|
||||||
|
|||||||
@ -897,7 +897,7 @@ implementation
|
|||||||
(assigned(getprocvardef) and
|
(assigned(getprocvardef) and
|
||||||
((block_type=bt_const) or
|
((block_type=bt_const) or
|
||||||
((m_tp_procvar in aktmodeswitches) and
|
((m_tp_procvar in aktmodeswitches) and
|
||||||
proc_to_procvar_equal(tprocsym(sym).defs^.def,getprocvardef,false)
|
proc_to_procvar_equal(tprocsym(sym).first_procdef,getprocvardef,false)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),again,p1);
|
),again,p1);
|
||||||
@ -1232,7 +1232,7 @@ implementation
|
|||||||
(assigned(getprocvardef) and
|
(assigned(getprocvardef) and
|
||||||
((block_type=bt_const) or
|
((block_type=bt_const) or
|
||||||
((m_tp_procvar in aktmodeswitches) and
|
((m_tp_procvar in aktmodeswitches) and
|
||||||
proc_to_procvar_equal(tprocsym(srsym).defs^.def,getprocvardef,false)
|
proc_to_procvar_equal(tprocsym(srsym).first_procdef,getprocvardef,false)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),again,p1);
|
),again,p1);
|
||||||
@ -2248,7 +2248,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.77 2002-08-18 20:06:24 peter
|
Revision 1.78 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.77 2002/08/18 20:06:24 peter
|
||||||
* inlining is now also allowed in interface
|
* inlining is now also allowed in interface
|
||||||
* renamed write/load to ppuwrite/ppuload
|
* renamed write/load to ppuwrite/ppuload
|
||||||
* tnode storing in ppu
|
* tnode storing in ppu
|
||||||
|
|||||||
@ -617,7 +617,6 @@ implementation
|
|||||||
procedure gen_main_procsym(const name:string;options:tproctypeoption;st:tsymtable);
|
procedure gen_main_procsym(const name:string;options:tproctypeoption;st:tsymtable);
|
||||||
var
|
var
|
||||||
stt : tsymtable;
|
stt : tsymtable;
|
||||||
procdefs : pprocdeflist;
|
|
||||||
begin
|
begin
|
||||||
{Generate a procsym for main}
|
{Generate a procsym for main}
|
||||||
make_ref:=false;
|
make_ref:=false;
|
||||||
@ -628,10 +627,7 @@ implementation
|
|||||||
stt:=symtablestack;
|
stt:=symtablestack;
|
||||||
symtablestack:=st;
|
symtablestack:=st;
|
||||||
aktprocdef:=tprocdef.create;
|
aktprocdef:=tprocdef.create;
|
||||||
new(procdefs);
|
aktprocsym.addprocdef(aktprocdef);
|
||||||
procdefs^.def:=aktprocdef;
|
|
||||||
procdefs^.next:=aktprocsym.defs;
|
|
||||||
aktprocsym.defs:=procdefs;
|
|
||||||
aktprocdef.procsym:=aktprocsym;
|
aktprocdef.procsym:=aktprocsym;
|
||||||
symtablestack:=stt;
|
symtablestack:=stt;
|
||||||
aktprocdef.proctypeoption:=options;
|
aktprocdef.proctypeoption:=options;
|
||||||
@ -1390,7 +1386,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.76 2002-09-02 18:46:26 peter
|
Revision 1.77 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.76 2002/09/02 18:46:26 peter
|
||||||
* insert PASCALMAIN in library for Win32 only
|
* insert PASCALMAIN in library for Win32 only
|
||||||
|
|
||||||
Revision 1.75 2002/08/31 15:59:30 florian
|
Revision 1.75 2002/08/31 15:59:30 florian
|
||||||
|
|||||||
@ -181,7 +181,7 @@ interface
|
|||||||
else
|
else
|
||||||
{ call to local function }
|
{ call to local function }
|
||||||
if (sym.typ=procsym) and (pos('BL',upper(s))>0) then
|
if (sym.typ=procsym) and (pos('BL',upper(s))>0) then
|
||||||
hs:=tprocsym(sym).defs^.def.mangledname;
|
hs:=tprocsym(sym).first_procdef.mangledname;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -227,10 +227,10 @@ interface
|
|||||||
{ procs can be called or the address can be loaded }
|
{ procs can be called or the address can be loaded }
|
||||||
if (pos('BL',upper(s))>0) {or (pos('LEA',upper(s))>0))} then
|
if (pos('BL',upper(s))>0) {or (pos('LEA',upper(s))>0))} then
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(sym).defs^.def) then
|
if Tprocsym(sym).procdef_count>1 then
|
||||||
Message1(asmr_w_direct_global_is_overloaded_func,hs);
|
Message1(asmr_w_direct_global_is_overloaded_func,hs);
|
||||||
Message2(asmr_h_direct_global_to_mangled,hs,tprocsym(sym).defs^.def.mangledname);
|
Message2(asmr_h_direct_global_to_mangled,hs,tprocsym(sym).defs^.def.mangledname);
|
||||||
hs:=tprocsym(sym).defs^.def.mangledname;
|
hs:=tprocsym(sym).first_procdef.mangledname;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
@ -314,7 +314,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2002-08-31 15:59:31 florian
|
Revision 1.4 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.3 2002/08/31 15:59:31 florian
|
||||||
+ HEAP* stuff must be generated for Linux/PPC as well
|
+ HEAP* stuff must be generated for Linux/PPC as well
|
||||||
+ direct assembler reader searches now global and static symtables as well
|
+ direct assembler reader searches now global and static symtables as well
|
||||||
|
|
||||||
|
|||||||
@ -580,10 +580,10 @@ implementation
|
|||||||
{ Give a better error if there is a forward def in the interface and only
|
{ Give a better error if there is a forward def in the interface and only
|
||||||
a single implementation }
|
a single implementation }
|
||||||
if (not aktprocdef.forwarddef) and
|
if (not aktprocdef.forwarddef) and
|
||||||
assigned(aktprocsym.defs^.next) and
|
(aktprocsym.procdef_count>1) and
|
||||||
aktprocsym.defs^.def.forwarddef and
|
aktprocsym.first_procdef.forwarddef and
|
||||||
aktprocsym.defs^.def.interfacedef and
|
aktprocsym.first_procdef.interfacedef and
|
||||||
not(assigned(aktprocsym.defs^.next^.next)) then
|
not(aktprocsym.procdef_count>2) then
|
||||||
begin
|
begin
|
||||||
Message1(parser_e_header_dont_match_forward,aktprocdef.fullprocname);
|
Message1(parser_e_header_dont_match_forward,aktprocdef.fullprocname);
|
||||||
aktprocsym.write_parameter_lists(aktprocdef);
|
aktprocsym.write_parameter_lists(aktprocdef);
|
||||||
@ -788,7 +788,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.69 2002-08-25 19:25:20 peter
|
Revision 1.70 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.69 2002/08/25 19:25:20 peter
|
||||||
* sym.insert_in_data removed
|
* sym.insert_in_data removed
|
||||||
* symtable.insertvardata/insertconstdata added
|
* symtable.insertvardata/insertconstdata added
|
||||||
* removed insert_in_data call from symtable.insert, it needs to be
|
* removed insert_in_data call from symtable.insert, it needs to be
|
||||||
|
|||||||
@ -393,9 +393,9 @@ implementation
|
|||||||
case srsym.typ of
|
case srsym.typ of
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(srsym).defs^.next) then
|
if Tprocsym(srsym).procdef_count>1 then
|
||||||
Message(parser_e_no_overloaded_procvars);
|
Message(parser_e_no_overloaded_procvars);
|
||||||
curconstSegment.concat(Tai_const_symbol.Createname_offset(tprocsym(srsym).defs^.def.mangledname,offset));
|
curconstSegment.concat(Tai_const_symbol.Createname_offset(tprocsym(srsym).first_procdef.mangledname,offset));
|
||||||
end;
|
end;
|
||||||
varsym :
|
varsym :
|
||||||
curconstSegment.concat(Tai_const_symbol.Createname_offset(tvarsym(srsym).mangledname,offset));
|
curconstSegment.concat(Tai_const_symbol.Createname_offset(tvarsym(srsym).mangledname,offset));
|
||||||
@ -733,7 +733,7 @@ implementation
|
|||||||
(tloadnode(p).symtableentry.typ=procsym) then
|
(tloadnode(p).symtableentry.typ=procsym) then
|
||||||
begin
|
begin
|
||||||
curconstSegment.concat(Tai_const_symbol.createname(
|
curconstSegment.concat(Tai_const_symbol.createname(
|
||||||
tprocsym(tloadnode(p).symtableentry).defs^.def.mangledname));
|
tprocsym(tloadnode(p).symtableentry).first_procdef.mangledname));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Message(cg_e_illegal_expression);
|
Message(cg_e_illegal_expression);
|
||||||
@ -986,7 +986,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.55 2002-08-11 14:32:27 peter
|
Revision 1.56 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.55 2002/08/11 14:32:27 peter
|
||||||
* renamed current_library to objectlibrary
|
* renamed current_library to objectlibrary
|
||||||
|
|
||||||
Revision 1.54 2002/08/11 13:24:13 peter
|
Revision 1.54 2002/08/11 13:24:13 peter
|
||||||
|
|||||||
@ -985,11 +985,11 @@ Begin
|
|||||||
end;
|
end;
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
if assigned(tprocsym(sym).defs^.next) then
|
if Tprocsym(sym).procdef_count>1 then
|
||||||
Message(asmr_w_calling_overload_func);
|
Message(asmr_w_calling_overload_func);
|
||||||
l:=opr.ref.offset;
|
l:=opr.ref.offset;
|
||||||
opr.typ:=OPR_SYMBOL;
|
opr.typ:=OPR_SYMBOL;
|
||||||
opr.symbol:=objectlibrary.newasmsymbol(tprocsym(sym).defs^.def.mangledname);
|
opr.symbol:=objectlibrary.newasmsymbol(tprocsym(sym).first_procdef.mangledname);
|
||||||
opr.symofs:=l;
|
opr.symofs:=l;
|
||||||
hasvar:=true;
|
hasvar:=true;
|
||||||
SetupVar:=TRUE;
|
SetupVar:=TRUE;
|
||||||
@ -1592,7 +1592,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.45 2002-08-25 19:25:20 peter
|
Revision 1.46 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.45 2002/08/25 19:25:20 peter
|
||||||
* sym.insert_in_data removed
|
* sym.insert_in_data removed
|
||||||
* symtable.insertvardata/insertconstdata added
|
* symtable.insertvardata/insertconstdata added
|
||||||
* removed insert_in_data call from symtable.insert, it needs to be
|
* removed insert_in_data call from symtable.insert, it needs to be
|
||||||
|
|||||||
@ -110,12 +110,15 @@ interface
|
|||||||
Tprocdefcallback = procedure(p:Tprocdef;arg:pointer);
|
Tprocdefcallback = procedure(p:Tprocdef;arg:pointer);
|
||||||
|
|
||||||
tprocsym = class(tstoredsym)
|
tprocsym = class(tstoredsym)
|
||||||
{ protected}
|
protected
|
||||||
defs : pprocdeflist; { linked list of overloaded procdefs }
|
defs : pprocdeflist; { linked list of overloaded procdefs }
|
||||||
|
function getprocdef(nr:cardinal):Tprocdef;
|
||||||
public
|
public
|
||||||
|
procdef_count : cardinal;
|
||||||
is_global : boolean;
|
is_global : boolean;
|
||||||
overloadchecked : boolean;
|
overloadchecked : boolean;
|
||||||
overloadcount : longint; { amount of overloaded functions in this module }
|
overloadcount : longint; { amount of overloaded functions in this module }
|
||||||
|
property procdef[nr:cardinal]:Tprocdef read getprocdef;
|
||||||
constructor create(const n : string);
|
constructor create(const n : string);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
@ -128,18 +131,19 @@ interface
|
|||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
procedure deref;override;
|
procedure deref;override;
|
||||||
procedure addprocdef(p:tprocdef);
|
procedure addprocdef(p:tprocdef);
|
||||||
function procdef_count:byte;
|
|
||||||
function procdef(nr:byte):Tprocdef;
|
|
||||||
procedure add_para_match_to(Aprocsym:Tprocsym);
|
procedure add_para_match_to(Aprocsym:Tprocsym);
|
||||||
procedure concat_procdefs_to(s:Tprocsym);
|
procedure concat_procdefs_to(s:Tprocsym);
|
||||||
procedure foreach_procdef_static(proc2call:Tprocdefcallback;arg:pointer);
|
procedure foreach_procdef_static(proc2call:Tprocdefcallback;arg:pointer);
|
||||||
function first_procdef:Tprocdef;
|
function first_procdef:Tprocdef;
|
||||||
function last_procdef:Tprocdef;
|
function last_procdef:Tprocdef;
|
||||||
|
function search_procdef_nopara_boolret:Tprocdef;
|
||||||
function search_procdef_bytype(pt:Tproctypeoption):Tprocdef;
|
function search_procdef_bytype(pt:Tproctypeoption):Tprocdef;
|
||||||
function search_procdef_bypara(params:Tparalinkedlist):Tprocdef;
|
function search_procdef_bypara(params:Tparalinkedlist;
|
||||||
|
allowconvert:boolean):Tprocdef;
|
||||||
function search_procdef_byprocvardef(d:Tprocvardef):Tprocdef;
|
function search_procdef_byprocvardef(d:Tprocvardef):Tprocdef;
|
||||||
|
function search_procdef_by1paradef(firstpara:Tdef):Tprocdef;
|
||||||
function search_procdef_byretdef_by1paradef(retdef,firstpara:Tdef;
|
function search_procdef_byretdef_by1paradef(retdef,firstpara:Tdef;
|
||||||
matchtype:Tdefmatch):Tprocdef;
|
matchtype:Tdefmatch):Tprocdef;
|
||||||
function write_references(ppufile:tcompilerppufile;locals:boolean):boolean;override;
|
function write_references(ppufile:tcompilerppufile;locals:boolean):boolean;override;
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
function stabstring : pchar;override;
|
function stabstring : pchar;override;
|
||||||
@ -786,6 +790,7 @@ implementation
|
|||||||
is_global:=false;
|
is_global:=false;
|
||||||
overloadchecked:=false;
|
overloadchecked:=false;
|
||||||
overloadcount:=0;
|
overloadcount:=0;
|
||||||
|
procdef_count:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -796,6 +801,7 @@ implementation
|
|||||||
inherited loadsym(ppufile);
|
inherited loadsym(ppufile);
|
||||||
typ:=procsym;
|
typ:=procsym;
|
||||||
defs:=nil;
|
defs:=nil;
|
||||||
|
procdef_count:=0;
|
||||||
repeat
|
repeat
|
||||||
pd:=tprocdef(ppufile.getderef);
|
pd:=tprocdef(ppufile.getderef);
|
||||||
if pd=nil then
|
if pd=nil then
|
||||||
@ -877,32 +883,19 @@ implementation
|
|||||||
pd^.def:=p;
|
pd^.def:=p;
|
||||||
pd^.next:=defs;
|
pd^.next:=defs;
|
||||||
defs:=pd;
|
defs:=pd;
|
||||||
|
inc(procdef_count);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function Tprocsym.procdef_count:byte;
|
function Tprocsym.getprocdef(nr:cardinal):Tprocdef;
|
||||||
|
|
||||||
var pd:Pprocdeflist;
|
var i:cardinal;
|
||||||
|
pd:Pprocdeflist;
|
||||||
begin
|
|
||||||
procdef_count:=0;
|
|
||||||
pd:=defs;
|
|
||||||
while assigned(pd) do
|
|
||||||
begin
|
|
||||||
inc(procdef_count);
|
|
||||||
pd:=pd^.next;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function Tprocsym.procdef(nr:byte):Tprocdef;
|
|
||||||
|
|
||||||
var i:byte;
|
|
||||||
pd:Pprocdeflist;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
pd:=defs;
|
pd:=defs;
|
||||||
for i:=2 to nr do
|
for i:=2 to nr do
|
||||||
pd:=pd^.next;
|
pd:=pd^.next;
|
||||||
procdef:=pd^.def;
|
getprocdef:=pd^.def;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tprocsym.add_para_match_to(Aprocsym:Tprocsym);
|
procedure Tprocsym.add_para_match_to(Aprocsym:Tprocsym);
|
||||||
@ -913,7 +906,7 @@ implementation
|
|||||||
pd:=defs;
|
pd:=defs;
|
||||||
while assigned(pd) do
|
while assigned(pd) do
|
||||||
begin
|
begin
|
||||||
if Aprocsym.search_procdef_bypara(pd^.def.para)=nil then
|
if Aprocsym.search_procdef_bypara(pd^.def.para,false)=nil then
|
||||||
Aprocsym.addprocdef(pd^.def);
|
Aprocsym.addprocdef(pd^.def);
|
||||||
pd:=pd^.next;
|
pd:=pd^.next;
|
||||||
end;
|
end;
|
||||||
@ -964,6 +957,24 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function Tprocsym.search_procdef_nopara_boolret:Tprocdef;
|
||||||
|
|
||||||
|
var p:Pprocdeflist;
|
||||||
|
|
||||||
|
begin
|
||||||
|
search_procdef_nopara_boolret:=nil;
|
||||||
|
p:=defs;
|
||||||
|
while p<>nil do
|
||||||
|
begin
|
||||||
|
if p^.def.para.empty and is_boolean(p^.def.rettype.def) then
|
||||||
|
begin
|
||||||
|
search_procdef_nopara_boolret:=p^.def;
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
p:=p^.next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function Tprocsym.search_procdef_bytype(pt:Tproctypeoption):Tprocdef;
|
function Tprocsym.search_procdef_bytype(pt:Tproctypeoption):Tprocdef;
|
||||||
|
|
||||||
var p:Pprocdeflist;
|
var p:Pprocdeflist;
|
||||||
@ -982,7 +993,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function Tprocsym.search_procdef_bypara(params:Tparalinkedlist):Tprocdef;
|
function Tprocsym.search_procdef_bypara(params:Tparalinkedlist;
|
||||||
|
allowconvert:boolean):Tprocdef;
|
||||||
|
|
||||||
var pd:Pprocdeflist;
|
var pd:Pprocdeflist;
|
||||||
|
|
||||||
@ -991,7 +1003,9 @@ implementation
|
|||||||
pd:=defs;
|
pd:=defs;
|
||||||
while assigned(pd) do
|
while assigned(pd) do
|
||||||
begin
|
begin
|
||||||
if equal_paras(pd^.def.para,params,cp_value_equal_const) then
|
if equal_paras(pd^.def.para,params,cp_value_equal_const) or
|
||||||
|
(allowconvert and convertable_paras(pd^.def.para,params,
|
||||||
|
cp_value_equal_const)) then
|
||||||
begin
|
begin
|
||||||
search_procdef_bypara:=pd^.def;
|
search_procdef_bypara:=pd^.def;
|
||||||
break;
|
break;
|
||||||
@ -1046,8 +1060,27 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function Tprocsym.search_procdef_by1paradef(firstpara:Tdef):Tprocdef;
|
||||||
|
|
||||||
|
var pd:Pprocdeflist;
|
||||||
|
|
||||||
|
begin
|
||||||
|
search_procdef_by1paradef:=nil;
|
||||||
|
pd:=defs;
|
||||||
|
while assigned(pd) do
|
||||||
|
begin
|
||||||
|
if is_equal(Tparaitem(pd^.def.para.first).paratype.def,firstpara) and
|
||||||
|
(Tparaitem(pd^.def.para.first).next=nil) then
|
||||||
|
begin
|
||||||
|
search_procdef_by1paradef:=pd^.def;
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
pd:=pd^.next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function Tprocsym.search_procdef_byretdef_by1paradef(retdef,firstpara:Tdef;
|
function Tprocsym.search_procdef_byretdef_by1paradef(retdef,firstpara:Tdef;
|
||||||
matchtype:Tdefmatch):Tprocdef;
|
matchtype:Tdefmatch):Tprocdef;
|
||||||
|
|
||||||
var pd:Pprocdeflist;
|
var pd:Pprocdeflist;
|
||||||
convtyp:Tconverttype;
|
convtyp:Tconverttype;
|
||||||
@ -1152,6 +1185,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ remove }
|
{ remove }
|
||||||
dispose(p);
|
dispose(p);
|
||||||
|
dec(procdef_count);
|
||||||
end;
|
end;
|
||||||
p:=hp;
|
p:=hp;
|
||||||
end;
|
end;
|
||||||
@ -2443,7 +2477,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.58 2002-09-01 08:01:16 daniel
|
Revision 1.59 2002-09-03 16:26:27 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.58 2002/09/01 08:01:16 daniel
|
||||||
* Removed sets from Tcallnode.det_resulttype
|
* Removed sets from Tcallnode.det_resulttype
|
||||||
+ Added read/write notifications of variables. These will be usefull
|
+ Added read/write notifications of variables. These will be usefull
|
||||||
for providing information for several optimizations. For example
|
for providing information for several optimizations. For example
|
||||||
|
|||||||
@ -166,13 +166,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ the manglednames can already be the same when the procedure
|
{ the manglednames can already be the same when the procedure
|
||||||
is declared with cdecl }
|
is declared with cdecl }
|
||||||
if tprocsym(hp2.sym).defs^.def.mangledname<>hp2.name^ then
|
if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
|
||||||
begin
|
begin
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
{ place jump in codesegment }
|
{ place jump in codesegment }
|
||||||
codesegment.concat(Tai_align.Create_op(4,$90));
|
codesegment.concat(Tai_align.Create_op(4,$90));
|
||||||
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
||||||
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
|
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).first_procdef.mangledname)));
|
||||||
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
end;
|
end;
|
||||||
@ -465,7 +465,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.23 2002-08-12 15:08:44 carl
|
Revision 1.24 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.23 2002/08/12 15:08:44 carl
|
||||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||||
+ tprocessor enumeration moved to cpuinfo
|
+ tprocessor enumeration moved to cpuinfo
|
||||||
+ linker in target_info is now a class
|
+ linker in target_info is now a class
|
||||||
|
|||||||
@ -168,13 +168,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ the manglednames can already be the same when the procedure
|
{ the manglednames can already be the same when the procedure
|
||||||
is declared with cdecl }
|
is declared with cdecl }
|
||||||
if tprocsym(hp2.sym).defs^.def.mangledname<>hp2.name^ then
|
if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
|
||||||
begin
|
begin
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
{ place jump in codesegment }
|
{ place jump in codesegment }
|
||||||
codesegment.concat(Tai_align.Create_op(4,$90));
|
codesegment.concat(Tai_align.Create_op(4,$90));
|
||||||
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
||||||
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
|
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).first_procdef.mangledname)));
|
||||||
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
end;
|
end;
|
||||||
@ -514,7 +514,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.28 2002-08-12 15:08:44 carl
|
Revision 1.29 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.28 2002/08/12 15:08:44 carl
|
||||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||||
+ tprocessor enumeration moved to cpuinfo
|
+ tprocessor enumeration moved to cpuinfo
|
||||||
+ linker in target_info is now a class
|
+ linker in target_info is now a class
|
||||||
|
|||||||
@ -175,13 +175,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ the manglednames can already be the same when the procedure
|
{ the manglednames can already be the same when the procedure
|
||||||
is declared with cdecl }
|
is declared with cdecl }
|
||||||
if tprocsym(hp2.sym).defs^.def.mangledname<>hp2.name^ then
|
if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
|
||||||
begin
|
begin
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
{ place jump in codesegment }
|
{ place jump in codesegment }
|
||||||
codesegment.concat(Tai_align.Create_op(4,$90));
|
codesegment.concat(Tai_align.Create_op(4,$90));
|
||||||
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
||||||
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
|
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).first_procdef.mangledname)));
|
||||||
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
end;
|
end;
|
||||||
@ -524,7 +524,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.32 2002-08-12 15:08:44 carl
|
Revision 1.33 2002-09-03 16:26:28 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.32 2002/08/12 15:08:44 carl
|
||||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||||
+ tprocessor enumeration moved to cpuinfo
|
+ tprocessor enumeration moved to cpuinfo
|
||||||
+ linker in target_info is now a class
|
+ linker in target_info is now a class
|
||||||
|
|||||||
@ -233,13 +233,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ the manglednames can already be the same when the procedure
|
{ the manglednames can already be the same when the procedure
|
||||||
is declared with cdecl }
|
is declared with cdecl }
|
||||||
if tprocsym(hp2.sym).defs^.def.mangledname<>hp2.name^ then
|
if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
|
||||||
begin
|
begin
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
{ place jump in codesegment }
|
{ place jump in codesegment }
|
||||||
codesegment.concat(Tai_align.Create_op(4,$90));
|
codesegment.concat(Tai_align.Create_op(4,$90));
|
||||||
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
||||||
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
|
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).first_procdef.mangledname)));
|
||||||
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
end;
|
end;
|
||||||
@ -484,7 +484,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.29 2002-08-12 15:08:44 carl
|
Revision 1.30 2002-09-03 16:26:29 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.29 2002/08/12 15:08:44 carl
|
||||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||||
+ tprocessor enumeration moved to cpuinfo
|
+ tprocessor enumeration moved to cpuinfo
|
||||||
+ linker in target_info is now a class
|
+ linker in target_info is now a class
|
||||||
|
|||||||
@ -182,13 +182,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ the manglednames can already be the same when the procedure
|
{ the manglednames can already be the same when the procedure
|
||||||
is declared with cdecl }
|
is declared with cdecl }
|
||||||
if tprocsym(hp2.sym).defs^.def.mangledname<>hp2.name^ then
|
if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
|
||||||
begin
|
begin
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
{ place jump in codesegment }
|
{ place jump in codesegment }
|
||||||
codesegment.concat(Tai_align.Create_op(4,$90));
|
codesegment.concat(Tai_align.Create_op(4,$90));
|
||||||
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
|
||||||
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).defs^.def.mangledname)));
|
codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).first_procdef.mangledname)));
|
||||||
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
|
||||||
{$endif i386}
|
{$endif i386}
|
||||||
end;
|
end;
|
||||||
@ -486,7 +486,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.28 2002-08-12 15:08:44 carl
|
Revision 1.29 2002-09-03 16:26:29 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.28 2002/08/12 15:08:44 carl
|
||||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||||
+ tprocessor enumeration moved to cpuinfo
|
+ tprocessor enumeration moved to cpuinfo
|
||||||
+ linker in target_info is now a class
|
+ linker in target_info is now a class
|
||||||
|
|||||||
@ -740,7 +740,7 @@ const
|
|||||||
typedconstsym :
|
typedconstsym :
|
||||||
address_table.concat(Tai_const_symbol.Createname_rva(ttypedconstsym(hp.sym).mangledname));
|
address_table.concat(Tai_const_symbol.Createname_rva(ttypedconstsym(hp.sym).mangledname));
|
||||||
procsym :
|
procsym :
|
||||||
address_table.concat(Tai_const_symbol.Createname_rva(tprocsym(hp.sym).defs^.def.mangledname));
|
address_table.concat(Tai_const_symbol.Createname_rva(tprocsym(hp.sym).first_procdef.mangledname));
|
||||||
end;
|
end;
|
||||||
inc(current_index);
|
inc(current_index);
|
||||||
hp:=texported_item(hp.next);
|
hp:=texported_item(hp.next);
|
||||||
@ -773,7 +773,7 @@ const
|
|||||||
typedconstsym :
|
typedconstsym :
|
||||||
s:=ttypedconstsym(hp.sym).mangledname;
|
s:=ttypedconstsym(hp.sym).mangledname;
|
||||||
procsym :
|
procsym :
|
||||||
s:=tprocsym(hp.sym).defs^.def.mangledname;
|
s:=tprocsym(hp.sym).first_procdef.mangledname;
|
||||||
else
|
else
|
||||||
s:='';
|
s:='';
|
||||||
end;
|
end;
|
||||||
@ -1553,7 +1553,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.39 2002-08-12 15:08:44 carl
|
Revision 1.40 2002-09-03 16:26:29 daniel
|
||||||
|
* Make Tprocdef.defs protected
|
||||||
|
|
||||||
|
Revision 1.39 2002/08/12 15:08:44 carl
|
||||||
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
+ stab register indexes for powerpc (moved from gdb to cpubase)
|
||||||
+ tprocessor enumeration moved to cpuinfo
|
+ tprocessor enumeration moved to cpuinfo
|
||||||
+ linker in target_info is now a class
|
+ linker in target_info is now a class
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user