* fixed range errors in label bookkeeping that caused too much memory to be

allocated for optimising jumps

git-svn-id: trunk@14470 -
This commit is contained in:
Jonas Maebe 2009-12-23 21:08:05 +00:00
parent 18e3f01552
commit 666b4e2469
2 changed files with 6 additions and 6 deletions

View File

@ -74,7 +74,7 @@ Unit aopt;
Var LabelFound: Boolean;
p: tai;
Begin
LabelInfo^.LowLabel := High(AWord);
LabelInfo^.LowLabel := High(longint);
LabelInfo^.HighLabel := 0;
LabelInfo^.LabelDif := 0;
LabelInfo^.LabelTable:=nil;
@ -91,9 +91,9 @@ Unit aopt;
(tai_Label(p).labsym.is_used) Then
Begin
LabelFound := True;
If (tai_Label(p).labsym.labelnr < int64(LowLabel)) Then
If (tai_Label(p).labsym.labelnr < LowLabel) Then
LowLabel := tai_Label(p).labsym.labelnr;
If (tai_Label(p).labsym.labelnr > int64(HighLabel)) Then
If (tai_Label(p).labsym.labelnr > HighLabel) Then
HighLabel := tai_Label(p).labsym.labelnr
End;
GetNextInstruction(p, p)
@ -191,7 +191,7 @@ Unit aopt;
LabelInfo^.labeltable := nil;
end;
LabelInfo^.labeldif:=0;
LabelInfo^.lowlabel:=high(AWord);
LabelInfo^.lowlabel:=high(longint);
LabelInfo^.highlabel:=0;
end;

View File

@ -216,8 +216,8 @@ Unit AoptObj;
TLabelInfo = Record
{ the highest and lowest label number occurring in the current code }
{ fragment }
LowLabel, HighLabel: AWord;
LabelDif: AWord;
LowLabel, HighLabel: longint;
LabelDif: cardinal;
{ table that contains the addresses of the Pai_Label objects associated
with each label number }
LabelTable: PLabelTable;