On Monday 04 March 2013 14:37:40 Daniël Mantione wrote: > Originally the compiler was doing the candidate selection with a simple > loop through the parameters that took the first suitable match. When the > type conversion matters became more complex the "Unable to determine > overloaded procedure" error became increasingle annoying. > > At some point I did redesign it with scoring system: Each candidate that > is compatible gets assigned a score how well the overloaded procedure > matches the parameters. The best match is selected. > > At that point, the compiler became highly intelligent in finding the > correct overloaded procedure/operator, but the amount of computing power > involved with overloading went up: Instead of selecting the first > candidate, we need to compute the score for all candidates. This even > requires floating point arithmetic. > This improvement is very visible. I had big problems to make MSEide Delphi compatible because Delphi many times reported "Unable to determine overloaded procedure" where FPC has no problems. I think this is worth a slow down of compile time. :-)
Martin _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel