Ambiguities in statistics screen and callertable

Beta Testing discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Ambiguities in statistics screen and callertable

#1 Post by Dany » 13 Oct 2010 11:44

This has not popped up in v4.10, it is already long the case in older mP versions.
Furthermore it does not hamper software development with mP v4.10 (nor the compiler, nor the IDE are erroneous here).


Hi, there are some ambiguities and subsequent errors in the statistics screen and the callerfile if 2 routines have the same name in different units.

This is the code of a test project:

Code: Select all

program SameProcNames;
uses Unit1, Unit2;
begin
  { Main program }
  Unit1Procedure;
  Unit2Procedure;
end.

unit Unit1;
procedure Unit1Procedure;
implementation
procedure SameName(xxx: byte);
begin
end;

procedure Unit1Procedure;
begin
  SameName(20);
end;

end.

unit Unit2;
procedure Unit2Procedure;
implementation
procedure SameName(yyy: byte);
begin
end;

procedure Unit2Procedure;
begin
  SameName(50);
end;

end.
As you can see, both Unit1 and Unit2 contain a local procedure with the same name, which is indeed completely legal. The compiler handles this well, no problems there.

The problems occur in

- the caller table, it shows:

Code: Select all

main
     Unit1Procedure
          SameName
     Unit2Procedure
          SameName
It seems like procedure "SameName" is called twice, while in reality there are 2 different "SameName" procedures.

- the "Statistics Function tree", it shows:
Image
As you can see, the statistics think that the 2nd "SameName" is also in Unit1.

- the "Statistics Function charts": the difference between the different "SameName"s can not be seen. This is only a very minor remark.

Thanks in advance! :D :D
Last edited by Dany on 05 Jan 2011 16:48, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Ambiguities in statistics screen and callertable

#2 Post by zristic » 14 Oct 2010 08:09

Thanks for the report.

Post Reply

Return to “mikroPascal PRO for PIC Beta Testing”