[Chapel Merge] Add fn exempt instantiation limit pragma and apply

Branch: refs/heads/main
Revision: 4728782
Author: stonea
Link: Add fn exempt instantiation limit pragma and apply it to isArrayValue by stonea · Pull Request #19899 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19899 from stonea/exempt_instantiation_limit_pragma

Add fn exempt instantiation limit pragma and apply it to isArrayValue

This is to address the test failures we see here:
In this PR #19856 I moved a function (isArrayValue) from an internal module to a standard module.
To prevent inifite recursions we limit the number of times a generic function can be instantiated and present an error message if it exceeds this limit. We exempt functions in internal (but not standard) modules from this limit.
It appears that isArrayValue is legitamatly instantiated an enormous number of times so in order to keep these tests running in this PR I introduce a pragma that lets us flag functions to be exempt from this check and exempt the isArrayValue function.

It may be worth spending more time to investigate why this function is being instantiated so many times and there may be better ways of determining which functions should be exempt from this check. In the meantime I think it's worth merging this PR.

I've manually verified that this PR resolves the build failure in Arkouda. I haven't run it through paratests but I can't imagine it could cause any failures.

[Reviewed by @mppf; thanks!]

Modified Files:
M compiler/dyno/include/chpl/uast/PragmaList.h

M compiler/resolution/generics.cpp
M modules/standard/Types.chpl

Compare: https://github.com/chapel-lang/chapel/compare/01b73b67dc44...47287824909b