mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* fix possible wrong typecast
This commit is contained in:
parent
0caeea9e61
commit
5906d4a967
@ -225,7 +225,8 @@ implementation
|
|||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
until false;
|
until false;
|
||||||
if (hp.nodetype=loadn) then
|
{ a tempref is used when it is loaded from a withsymtable }
|
||||||
|
if (hp.nodetype in [loadn,temprefn]) then
|
||||||
begin
|
begin
|
||||||
hp:=ccallnode.create_procvar(nil,p1);
|
hp:=ccallnode.create_procvar(nil,p1);
|
||||||
resulttypepass(hp);
|
resulttypepass(hp);
|
||||||
@ -454,10 +455,12 @@ implementation
|
|||||||
end;
|
end;
|
||||||
loadn:
|
loadn:
|
||||||
begin
|
begin
|
||||||
if not(vo_is_thread_var in tvarsym(tloadnode(p).symtableentry).varoptions) then
|
{ threadvars need a helper call }
|
||||||
inc(result)
|
if (tloadnode(p).symtableentry.typ=varsym) and
|
||||||
|
(vo_is_thread_var in tvarsym(tloadnode(p).symtableentry).varoptions) then
|
||||||
|
inc(result,5)
|
||||||
else
|
else
|
||||||
inc(result,5);
|
inc(result);
|
||||||
if (result >= NODE_COMPLEXITY_INF) then
|
if (result >= NODE_COMPLEXITY_INF) then
|
||||||
result := NODE_COMPLEXITY_INF;
|
result := NODE_COMPLEXITY_INF;
|
||||||
exit;
|
exit;
|
||||||
@ -516,7 +519,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.18 2004-08-04 08:35:59 jonas
|
Revision 1.19 2004-08-25 15:54:46 peter
|
||||||
|
* fix possible wrong typecast
|
||||||
|
|
||||||
|
Revision 1.18 2004/08/04 08:35:59 jonas
|
||||||
* some improvements to node complexity calculations
|
* some improvements to node complexity calculations
|
||||||
|
|
||||||
Revision 1.17 2004/07/15 20:59:58 jonas
|
Revision 1.17 2004/07/15 20:59:58 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user