Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2016-12

FPC black list details

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Maciej Izak

Hi again,

FPC has problems with examples attached with
http://bugs.freepascal.org/view.php?id=25607 . The bug is caused by improper "calculation of distance" for methods with default parameter (methods with default parameter are ignored for few scenarios so compiler can't determine).
During my detailed research I discovered that Delphi implementation has small bug (VMT is ignored for scenario E01 and E03 which is totally improper).

I have made patch for this bug attached to #25607 : http://bugs.freepascal.org/file_download.php?file_id=25047&type=bug

FPC black list details:

E01 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e01-pas {E01 Delphi | FPC with calc_distance }
TA.Create | TB.Create
TB.Create | TB.Create
TB.Create | TB.Create

E02 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e02-pas {E02 Delphi | FPC with calc_distance }
TA.Create | TA.Create
TA.Create | TA.Create
TA.Create | TA.Create

E03 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e03-pas {E03 Delphi | FPC with calc_distance }
TA.Foo | TB.Foo
TB.Foo | TB.Foo
TB.Foo | TB.Foo

E04 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e04-pas {E04 Delphi | FPC with calc_distance }
TA.Foo | TA.Foo
TA.Foo | TA.Foo
TA.Foo | TA.Foo

E05 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e05-pas {E05 Delphi | FPC with calc_distance }
TB.Foo | TB.Foo

E06 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e06-pas {E06 Delphi | FPC with calc_distance }
TA.Foo | TA.Foo

Best regards, Maciej Izak

Reply by email

Maciej Izak
to Jonas Maebe

2016-12-08 12:15 GMT+01:00 Jonas Maebe :

Does this version of the patch fix the issue from http://bugs.freepascal.org/view.php?id=31081 ? Or is your change (probably) unrelated to that?

I think it is unrelated but we need to wait for report from Alf. If it is caused by calc_distance I will try to improve the patch (btw. the patch is almost from beginning with NewPascal and it works perfect without any regressions for tests. Also calc_distance works with all tested platforms and for all cross compilers, so I have hope that #31081 is unrelated).

Best regards, Maciej Izak

Reply by email

Jonas Maebe
to Maciej Izak: 2016-12-08 12:15 GMT+01:00 Jonas Maebe : I think it is unrelated but we need to wait for…
Maciej Izak wrote 6 lines
I think it is unrelated but we need to wait for report from Alf. If it is caused by calc_distance I will try to improve the patch (btw. the patch is almost from beginning with NewPascal and it works perfect without any regressions for tests. Also calc_distance works with all tested platforms and for all cross compilers, so I have hope that #31081 is unrelated).

The problem is that the bug report is about resolving calls specific to Objective-Pascal, which is only supported (and hence tested) on Darwin-based platforms by FPC (Mac OS X/OS X/macOS, iOS). So your testing probably did not cover this. If Alf confirms it works fine with trunk, I'll check your patch.

Jonas

Reply by email

Maciej Izak
to Sven Barth

2016-12-08 14:34 GMT+01:00 Sven Barth :

Small formal note: you should check the coding style of your patch again. There are superfluous spaces among some expressions. ;) (also we tend to use assigned() instead of a check for nil with (in)equality)

True, thanks for note. Even spaces around "=" are wrong, and useless "objdef: tobjectdef;" local variable. The patch is much older than MO (almost 2 years old, was created before my more serious compiler work), I forgot to rework this part. :\ Should I rework this patch again?

Best regards, Maciej Izak

Reply by email

Sven Barth
to Maciej Izak
"Maciej Izak" wrote 5 lines
2016-12-08 14:34 GMT+01:00 Sven Barth : > > Small formal note: you should check the coding style of your patch

again. There are superfluous spaces among some expressions. ;) (also we tend to use assigned() instead of a check for nil with (in)equality)

True, thanks for note. Even spaces around "=" are wrong, and useless

"objdef: tobjectdef;" local variable. The patch is much older than MO (almost 2 years old, was created before my more serious compiler work), I forgot to rework this part. :\ Should I rework this patch again?

Also parameter declarations should have no spaces while local variables have should a space before and after the colon...

If it isn't too much of an effort for you, then yes, rework it please. Otherwise the one who commits that will have to remember that. :)

Regards,
Sven

Reply by email

Jonas Maebe
to Sven Barth
Sven Barth wrote
If it isn't too much of an effort for you, then yes, rework it please. Otherwise the one who commits that will have to remember that. :)

I will do it while fixing the Objective Pascal issue. I think I already know what the problem is.

Jonas

Reply by email

Maciej Izak
to Jonas Maebe: The problem is that the bug report is about resolving calls specific to Objective-Pascal,…

2016-12-08 13:04 GMT+01:00 Jonas Maebe :

Show quoted text 6 lines
The problem is that the bug report is about resolving calls specific to Objective-Pascal, which is only supported (and hence tested) on Darwin-based platforms by FPC (Mac OS X/OS X/macOS, iOS). So your testing probably did not cover this. If Alf confirms it works fine with trunk, I'll check your patch.

You were right... I was so close :\. Now I need to find some mac for better testing experience. Thanks for improved version.

Best regards, Maciej Izak

Reply by email