0005235: Re: Error in compile error report

git-svn-id: http://code.remobjects.com/svn/pascalscript@59 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
This commit is contained in:
carlokok 2008-03-31 06:36:36 +00:00
parent 20a72b174e
commit 91bbdf9479
5 changed files with 13 additions and 9 deletions

View File

@ -1,3 +1,5 @@
March 2008
- 0005235: Re: Error in compile error report
Feb 2008
- 0005025: InvokeExternalMethod possible bug
- 0003016: ranges .. in case statement not working

View File

@ -10676,6 +10676,7 @@ var
if @FOnBeforeCleanup <> nil then
FOnBeforeCleanup(Self); // no reason it actually read the result of this call
FGlobalBlock.Free;
FGlobalBlock := nil;
for I := 0 to FRegProcs.Count - 1 do
TObject(FRegProcs[I]).Free;

View File

@ -540,7 +540,7 @@ procedure CompTranslateLineInfo(Sender: TPSPascalCompiler; var Pos, Row, Col: Ca
var
res: TPSLineInfoResults;
begin
if TPSScript(Sender.ID).FPP.CurrentLineInfo.GetLineInfo(Pos, Res) then
if TPSScript(Sender.ID).FPP.CurrentLineInfo.GetLineInfo(Name, Pos, Res) then
begin
Pos := Res.Pos;
Row := Res.Row;

View File

@ -74,7 +74,7 @@ type
procedure Clear;
function GetLineInfo(Pos: Cardinal; var Res: TPSLineInfoResults): Boolean;
function GetLineInfo(const ModuleName: string; Pos: Cardinal; var Res: TPSLineInfoResults): Boolean;
property Current: Longint read FCurrent write FCurrent;
@ -258,16 +258,20 @@ begin
Result := TPSLineInfo(FItems[i]);
end;
function TPSLineInfoList.GetLineInfo(Pos: Cardinal; var Res: TPSLineInfoResults): Boolean;
function TPSLineInfoList.GetLineInfo(const ModuleName: string; Pos: Cardinal; var Res: TPSLineInfoResults): Boolean;
var
i,j: Longint;
linepos: Cardinal;
Item: TPSLineInfo;
lModuleName: string;
begin
lModuleName := FastUpperCase(lModuleName);
for i := FItems.Count -1 downto 0 do
begin
Item := FItems[i];
if (Pos >= Item.StartPos) and (Pos < Item.EndPos) then
if (Pos >= Item.StartPos) and (Pos < Item.EndPos) and
(lModuleName = '') or (lModuleName = Item.FileName) then
begin
Res.Name := Item.FileName;
Pos := Pos - Item.StartPos;
@ -487,7 +491,7 @@ procedure TPSPreProcessor.AdjustMessage(Msg: TPSPascalCompilerMessage);
var
Res: TPSLineInfoResults;
begin
if CurrentLineInfo.GetLineInfo(Msg.Pos, Res) then
if CurrentLineInfo.GetLineInfo(Msg.ModuleName, Msg.Pos, Res) then
begin
Msg.SetCustomPos(res.Pos, Res.Row, Res.Col);
Msg.ModuleName := Res.Name;

View File

@ -10923,9 +10923,6 @@ begin
end;
else begin
PPSVariantPointer(Res).DataDest := Pointer(FStack^);
(*{$IFNDEF PS_NOINT64}
FStack := Pointer(IPointer(FStack) + 4);
{$ENDIF}*)
Inc(Result, 4);
end;
end;