mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:29:24 +02:00
Use longint type instead of AWord for Initial parameter in CalcExecutionWeigths (to avoid range error for avr compiler)
git-svn-id: trunk@40104 -
This commit is contained in:
parent
7a07f848e8
commit
8cd55d4603
@ -49,7 +49,7 @@ unit optutils;
|
|||||||
procedure CalcDefSum(p : tnode);
|
procedure CalcDefSum(p : tnode);
|
||||||
|
|
||||||
{ calculates/estimates the field execution weight of optinfo }
|
{ calculates/estimates the field execution weight of optinfo }
|
||||||
procedure CalcExecutionWeights(p : tnode;Initial : AWord = 100);
|
procedure CalcExecutionWeights(p : tnode;Initial : longint = 100);
|
||||||
|
|
||||||
{ returns true, if n is a valid node and has life info }
|
{ returns true, if n is a valid node and has life info }
|
||||||
function has_life_info(n : tnode) : boolean;
|
function has_life_info(n : tnode) : boolean;
|
||||||
@ -359,12 +359,12 @@ unit optutils;
|
|||||||
|
|
||||||
function SetExecutionWeight(var n: tnode; arg: pointer): foreachnoderesult;
|
function SetExecutionWeight(var n: tnode; arg: pointer): foreachnoderesult;
|
||||||
var
|
var
|
||||||
Weight : AWord;
|
Weight : longint;
|
||||||
i : Integer;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
Result:=fen_false;
|
Result:=fen_false;
|
||||||
n.allocoptinfo;
|
n.allocoptinfo;
|
||||||
Weight:=max(PAWord(arg)^,1);
|
Weight:=max(plongint(arg)^,1);
|
||||||
case n.nodetype of
|
case n.nodetype of
|
||||||
casen:
|
casen:
|
||||||
begin
|
begin
|
||||||
@ -393,7 +393,7 @@ unit optutils;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure CalcExecutionWeights(p : tnode;Initial : AWord = 100);
|
procedure CalcExecutionWeights(p : tnode;Initial : longint = 100);
|
||||||
begin
|
begin
|
||||||
if assigned(p) then
|
if assigned(p) then
|
||||||
foreachnodestatic(pm_postprocess,p,@SetExecutionWeight,Pointer(@Initial));
|
foreachnodestatic(pm_postprocess,p,@SetExecutionWeight,Pointer(@Initial));
|
||||||
|
Loading…
Reference in New Issue
Block a user