[Chapel Merge] IFC: initial interface-constrained variant of PCGR

Branch: refs/heads/master
Revision: 66fd7bf
Author: vasslitvinov
Log Message:

Merge pull request #17768 from vasslitvinov/ifc-random

IFC: initial interface-constrained variant of PCGRandomStream

This introduces an interface RandomStream, implemented by PCGRandomStream,
and an interface-constrained variant of PCGRandomStream.fillRandom,
and also advances the implementation of interface generics
(mostly interfaceResolution.cpp) to support this code.

Test changes:

  • adds test/constrained-generics/random/

    • MyRandom.chpl : a slight variation on the standard Random.chpl
    • test-random.chpl : the newly introduced interfaces and testing
    • demo-random.chpl : a slimmed-down version of test-random.chpl
  • adjusts several .bad files to reflect the new behavior

While there:

  • remove the commented out INT_FATAL("CG case")
    temporarily introduced in #17371

Future work:

  • switch holder blocks to BLOCK_SCOPELESS, which should prevent them
    from carrying instantiation points and allow their complete removal

  • factor out the testing of icFillRandom() into an IC function
    along the lines of testGetNth(), i.e., passing an array and a stream
    into IC-generic formals

Some development history is available at c95d6a9e20..0eb886f554

r: @mppf

Modified Files:
A test/constrained-generics/basic/set2/ref-intents-1.chpl

A test/constrained-generics/basic/set2/ref-intents-1.good
A test/constrained-generics/basic/set2/ref-intents-2.chpl
A test/constrained-generics/basic/set2/ref-intents-2.good
A test/constrained-generics/random/MyRandom.chpl
A test/constrained-generics/random/MyRandom.notest
A test/constrained-generics/random/demo-random.chpl
A test/constrained-generics/random/demo-random.good
A test/constrained-generics/random/test-random.chpl
A test/constrained-generics/random/test-random.good
M compiler/include/resolution.h
M compiler/passes/resolveIntents.cpp
M compiler/resolution/cleanups.cpp
M compiler/resolution/generics.cpp
M compiler/resolution/interfaceResolution.cpp
M test/constrained-generics/ucol/cwailes-1/tier_1_class_type.bad
M test/constrained-generics/ucol/cwailes-1/tier_1_interface_method.bad
M test/constrained-generics/ucol/cwailes-1/tier_1_subtyping_0.bad
M test/constrained-generics/ucol/jsiek/test_method_in_interface.bad

Compare: https://github.com/chapel-lang/chapel/compare/55e3488a0101...66fd7bf48266