mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:09:20 +02:00
* small tweak to use speedvalue before comparing strings
This commit is contained in:
parent
52b34259f1
commit
52ed1daebc
@ -52,6 +52,7 @@ interface
|
|||||||
|
|
||||||
psymcoll = ^tsymcoll;
|
psymcoll = ^tsymcoll;
|
||||||
tsymcoll = record
|
tsymcoll = record
|
||||||
|
speedvalue : cardinal;
|
||||||
name : pstring;
|
name : pstring;
|
||||||
data : pprocdefcoll;
|
data : pprocdefcoll;
|
||||||
next : psymcoll;
|
next : psymcoll;
|
||||||
@ -510,6 +511,7 @@ implementation
|
|||||||
hp : pprocdeflist;
|
hp : pprocdeflist;
|
||||||
symcoll : psymcoll;
|
symcoll : psymcoll;
|
||||||
_name : string;
|
_name : string;
|
||||||
|
_speed : cardinal;
|
||||||
|
|
||||||
procedure newdefentry(pd:tprocdef);
|
procedure newdefentry(pd:tprocdef);
|
||||||
begin
|
begin
|
||||||
@ -546,6 +548,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ if not, generate a new symbol item }
|
{ if not, generate a new symbol item }
|
||||||
new(symcoll);
|
new(symcoll);
|
||||||
|
symcoll^.speedvalue:=sym.speedvalue;
|
||||||
symcoll^.name:=stringdup(sym.name);
|
symcoll^.name:=stringdup(sym.name);
|
||||||
symcoll^.next:=wurzel;
|
symcoll^.next:=wurzel;
|
||||||
symcoll^.data:=nil;
|
symcoll^.data:=nil;
|
||||||
@ -578,11 +581,15 @@ implementation
|
|||||||
is_visible:=tprocsym(sym).is_visible_for_object(_class);
|
is_visible:=tprocsym(sym).is_visible_for_object(_class);
|
||||||
{ check the current list of symbols }
|
{ check the current list of symbols }
|
||||||
_name:=sym.name;
|
_name:=sym.name;
|
||||||
|
_speed:=sym.speedvalue;
|
||||||
symcoll:=wurzel;
|
symcoll:=wurzel;
|
||||||
while assigned(symcoll) do
|
while assigned(symcoll) do
|
||||||
begin
|
begin
|
||||||
{ does the symbol already exist in the list ? }
|
{ does the symbol already exist in the list? First
|
||||||
if _name=symcoll^.name^ then
|
compare speedvalue before doing the string compare to
|
||||||
|
speed it up a little }
|
||||||
|
if (_speed=symcoll^.speedvalue) and
|
||||||
|
(_name=symcoll^.name^) then
|
||||||
begin
|
begin
|
||||||
{ walk through all defs of the symbol }
|
{ walk through all defs of the symbol }
|
||||||
for i:=1 to Tprocsym(sym).procdef_count do
|
for i:=1 to Tprocsym(sym).procdef_count do
|
||||||
@ -1307,7 +1314,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.30 2002-10-06 16:40:25 florian
|
Revision 1.31 2002-10-15 19:00:42 peter
|
||||||
|
* small tweak to use speedvalue before comparing strings
|
||||||
|
|
||||||
|
Revision 1.30 2002/10/06 16:40:25 florian
|
||||||
* interface wrapper name mangling improved
|
* interface wrapper name mangling improved
|
||||||
|
|
||||||
Revision 1.29 2002/10/05 12:43:25 carl
|
Revision 1.29 2002/10/05 12:43:25 carl
|
||||||
|
Loading…
Reference in New Issue
Block a user