mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 01:29:29 +02:00
* 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:
parent
18e3f01552
commit
666b4e2469
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user