mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
* More changes for operator bug
Order_overloaded method removed because it conflicted with new implementation where the defs are ordered according to the unit loading order !
This commit is contained in:
parent
25d48db77a
commit
3174b39bcc
@ -785,9 +785,6 @@ unit pmodules;
|
||||
end;
|
||||
hp:=pused_unit(hp^.next);
|
||||
end;
|
||||
{$ifndef DONOTCHAINOPERATORS}
|
||||
symtablestack^.chainoperators;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
aktprocsym:=oldprocsym;
|
||||
end;
|
||||
|
||||
@ -1164,6 +1161,10 @@ unit pmodules;
|
||||
unitst^.next:=symtablestack;
|
||||
symtablestack:=unitst;
|
||||
|
||||
{$ifndef DONOTCHAINOPERATORS}
|
||||
symtablestack^.chainoperators;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
|
||||
{$ifdef DEBUG}
|
||||
test_symtablestack;
|
||||
{$endif DEBUG}
|
||||
@ -1490,6 +1491,10 @@ unit pmodules;
|
||||
if token=_USES then
|
||||
loadunits;
|
||||
|
||||
{$ifndef DONOTCHAINOPERATORS}
|
||||
symtablestack^.chainoperators;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
|
||||
{ reset ranges/stabs in exported definitions }
|
||||
reset_global_defs;
|
||||
|
||||
@ -1668,7 +1673,13 @@ unit pmodules;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.189 2000-04-25 23:55:30 pierre
|
||||
Revision 1.190 2000-04-26 08:54:18 pierre
|
||||
* More changes for operator bug
|
||||
Order_overloaded method removed because it conflicted with
|
||||
new implementation where the defs are ordered
|
||||
according to the unit loading order !
|
||||
|
||||
Revision 1.189 2000/04/25 23:55:30 pierre
|
||||
+ Hint about unused unit
|
||||
* Testop bug fixed !!
|
||||
Now the operators are only applied if the unit is explicitly loaded
|
||||
|
@ -264,15 +264,17 @@ begin
|
||||
aktprocsym:=new(pprocsym,init(sp));
|
||||
{ for operator we have only one definition for each overloaded
|
||||
operation }
|
||||
{$ifdef DONOTCHAINOPERATORS}
|
||||
if (options=potype_operator) then
|
||||
begin
|
||||
{ the only problem is that nextoverloaded might not be in a unit
|
||||
known for the unit itself }
|
||||
{ not anymore PM }
|
||||
if assigned(overloaded_operators[optoken]) then
|
||||
aktprocsym^.definition:=overloaded_operators[optoken]^.definition;
|
||||
end;
|
||||
{$ifndef DONOTCHAINOPERATORS}
|
||||
overloaded_operators[optoken]:=aktprocsym;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
end;
|
||||
symtablestack^.insert(aktprocsym);
|
||||
end;
|
||||
|
||||
@ -2014,7 +2016,13 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.58 2000-04-25 23:55:29 pierre
|
||||
Revision 1.59 2000-04-26 08:54:19 pierre
|
||||
* More changes for operator bug
|
||||
Order_overloaded method removed because it conflicted with
|
||||
new implementation where the defs are ordered
|
||||
according to the unit loading order !
|
||||
|
||||
Revision 1.58 2000/04/25 23:55:29 pierre
|
||||
+ Hint about unused unit
|
||||
* Testop bug fixed !!
|
||||
Now the operators are only applied if the unit is explicitly loaded
|
||||
|
@ -409,6 +409,9 @@
|
||||
pd^.forwarddef:=false;
|
||||
end;
|
||||
pd:=pd^.nextoverloaded;
|
||||
{ do not check defs of operators in other units }
|
||||
if pd^.procsym<>@self then
|
||||
pd:=nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -419,6 +422,7 @@
|
||||
last,pd : pprocdef;
|
||||
begin
|
||||
resolvedef(pdef(definition));
|
||||
{$ifdef DONOTCHAINOPERATORS}
|
||||
if (definition^.proctypeoption=potype_operator) then
|
||||
begin
|
||||
last:=definition;
|
||||
@ -444,8 +448,10 @@
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
end;
|
||||
|
||||
{$ifdef DONOTCHAINOPERATORS}
|
||||
procedure tprocsym.order_overloaded;
|
||||
var firstdef,currdef,lastdef : pprocdef;
|
||||
begin
|
||||
@ -485,6 +491,7 @@
|
||||
currdef:=currdef^.nextoverloaded;
|
||||
end;
|
||||
end;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
|
||||
procedure tprocsym.write;
|
||||
begin
|
||||
@ -2137,7 +2144,13 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.142 2000-04-19 08:24:41 pierre
|
||||
Revision 1.143 2000-04-26 08:54:19 pierre
|
||||
* More changes for operator bug
|
||||
Order_overloaded method removed because it conflicted with
|
||||
new implementation where the defs are ordered
|
||||
according to the unit loading order !
|
||||
|
||||
Revision 1.142 2000/04/19 08:24:41 pierre
|
||||
* remove a memory leak with resourcestrings
|
||||
|
||||
Revision 1.141 2000/04/03 14:50:05 pierre
|
||||
|
@ -115,7 +115,9 @@
|
||||
{ tests, if all procedures definitions are defined and not }
|
||||
{ only forward }
|
||||
procedure check_forward;
|
||||
{$ifdef DONOTCHAINOPERATORS}
|
||||
procedure order_overloaded;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
procedure write;virtual;
|
||||
procedure deref;virtual;
|
||||
procedure load_references;virtual;
|
||||
@ -317,7 +319,13 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.46 2000-02-09 13:23:05 peter
|
||||
Revision 1.47 2000-04-26 08:54:19 pierre
|
||||
* More changes for operator bug
|
||||
Order_overloaded method removed because it conflicted with
|
||||
new implementation where the defs are ordered
|
||||
according to the unit loading order !
|
||||
|
||||
Revision 1.46 2000/02/09 13:23:05 peter
|
||||
* log truncated
|
||||
|
||||
Revision 1.45 2000/01/07 01:14:41 peter
|
||||
@ -386,4 +394,4 @@
|
||||
+ resourcestring implemented
|
||||
+ start of longstring support
|
||||
|
||||
}
|
||||
}
|
@ -1469,11 +1469,13 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef DONOTCHAINOPERATORS}
|
||||
procedure order_overloads(p : Pnamedindexobject);
|
||||
begin
|
||||
if psym(p)^.typ=procsym then
|
||||
pprocsym(p)^.order_overloaded;
|
||||
end;
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
|
||||
procedure tsymtable.foreach(proc2call : tnamedindexcallback);
|
||||
begin
|
||||
@ -1751,8 +1753,11 @@ implementation
|
||||
aktlocalsymtable:=@self;
|
||||
end;
|
||||
end;
|
||||
{ order procsym overloads }
|
||||
{$ifdef DONOTCHAINOPERATORS}
|
||||
{ obsolete code DO NOT USE it anymore PM }
|
||||
{ order procsym overloads }
|
||||
foreach({$ifndef TP}@{$endif}Order_overloads);
|
||||
{$endif DONOTCHAINOPERATORS}
|
||||
{ write definitions }
|
||||
writedefs;
|
||||
{ write symbols }
|
||||
@ -2879,7 +2884,13 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.85 2000-04-25 23:55:30 pierre
|
||||
Revision 1.86 2000-04-26 08:54:19 pierre
|
||||
* More changes for operator bug
|
||||
Order_overloaded method removed because it conflicted with
|
||||
new implementation where the defs are ordered
|
||||
according to the unit loading order !
|
||||
|
||||
Revision 1.85 2000/04/25 23:55:30 pierre
|
||||
+ Hint about unused unit
|
||||
* Testop bug fixed !!
|
||||
Now the operators are only applied if the unit is explicitly loaded
|
||||
|
Loading…
Reference in New Issue
Block a user