[fpc-devel] Getting built-in string type

Ryan Joseph ryan at thealchemistguild.com
Sun Mar 10 20:11:46 CET 2019


Here’s what I have so far with some some tests included now. It’s complete in it’s current form but I see what you mean about extending tcallcandidates. I looked over everything again but right now I don’t see exactly how to achieve that. I took the approach to take the dummy type sym and parse the parameters, perform the specialization and then follow the normal code paths for proc calls (with the exception that the parameters were parsed in an earlier stage than usual).

The thing that really stopped me from going another route was that the dummy is just a type and needs to be converted to a procsym but that requires the params to be parsed so at least the parameter count could be known so the generic name could be found (like SomeFunc$1). Anything’s possible but going that route seemed more intrusive to the design that already existed. Who knows, my head already hurts thinking about this too much. :)

So anyways look it over and see if this is acceptable. It does at least work though which is pretty great because it’s a crucial addition for generics imo.

https://github.com/genericptr/freepascal/tree/generic_implicit

Regards,
	Ryan Joseph




More information about the fpc-devel mailing list