Recent

Author Topic: Alternative set of string-to-int conversion routines  (Read 26429 times)

avk

  • Hero Member
  • *****
  • Posts: 752
Re: Alternative set of string-to-int conversion routines
« Reply #75 on: January 31, 2022, 08:53:27 am »
Thank you, I would like to hope that there are still no contradictions here.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Alternative set of string-to-int conversion routines
« Reply #76 on: February 01, 2022, 12:38:03 pm »
One potential issue might be (not tested): the generic code is compiled without debug information, but code that uses it is compiled with and thus the specialization will have debug information as well. Thus when stepping through the latter code one might suddenly land in the generic code which one assumed is without debug information.

On the other hand, I invariably use a locally-built FPC+Lazarus and looking at my build log for FPC 3.2.0 I see

make NO_GDB=1 CPU_TARGET=i386 OPT='-V3.0.4 -O- -gl -Xs- -vt' all |/usr/local/bin/fpc-filter-vt

Lazarus+LCL though is built with default options, so it could be there.

I'll try to keep an eye open for what I think I've seen, and will report back.

I've caught it in the act. If a method is declared virtual+abstract and then overridden in a subclass, stepping into the method's implementation takes you through fpc_check_object_ext() which is in generic.inc. So it gives the impression that generic stuff is being pulled in, even if that's not in fact happening.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Alternative set of string-to-int conversion routines
« Reply #77 on: February 01, 2022, 01:38:03 pm »
One potential issue might be (not tested): the generic code is compiled without debug information, but code that uses it is compiled with and thus the specialization will have debug information as well. Thus when stepping through the latter code one might suddenly land in the generic code which one assumed is without debug information.

On the other hand, I invariably use a locally-built FPC+Lazarus and looking at my build log for FPC 3.2.0 I see

make NO_GDB=1 CPU_TARGET=i386 OPT='-V3.0.4 -O- -gl -Xs- -vt' all |/usr/local/bin/fpc-filter-vt

Lazarus+LCL though is built with default options, so it could be there.

I'll try to keep an eye open for what I think I've seen, and will report back.

I've caught it in the act. If a method is declared virtual+abstract and then overridden in a subclass, stepping into the method's implementation takes you through fpc_check_object_ext() which is in generic.inc. So it gives the impression that generic stuff is being pulled in, even if that's not in fact happening.

Well, not everything that's named “generic” does involve generics. ;)

Though I wonder why it steps through fpc_check_object_check? Do you have the RTL compiled with debug information?

Sidenote: This check is only active if either object checks or range checks are enabled

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Alternative set of string-to-int conversion routines
« Reply #78 on: February 01, 2022, 02:12:25 pm »
Well, not everything that's named “generic” does involve generics. ;)

Note that I'm not complaining- particularly while I can see what I've seen.

Quote
Though I wonder why it steps through fpc_check_object_check? Do you have the RTL compiled with debug information?

Compiled with -O- -gl -Xs- which I presume would be sufficient... that's a legacy of when I'd also got SPARC etc. running years ago and some things were a bit less than robust.

Quote
Sidenote: This check is only active if either object checks or range checks are enabled

Also enabled at the project level, although probably not for the LCL etc.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

avk

  • Hero Member
  • *****
  • Posts: 752
Re: Alternative set of string-to-int conversion routines
« Reply #79 on: February 02, 2022, 05:43:17 pm »
This is of course so important for the current topic.

I don't even know how to thank you.

 

TinyPortal © 2005-2018