[Chapel Merge] dyno: make params without values be considered unk

Branch: refs/heads/main
Revision: 1fc2ec9
Author: DanilaFe
Link: dyno: make params without values be considered unknown by DanilaFe · Pull Request #20518 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20518 from DanilaFe/fix-param-unknown

dyno: make params without values be considered unknown

This is needed for the resolution of if-expressions with param
conditions. An if-expression depending on a param bool without a value
should be considered unknown (as is the case for an if-expression
depending on any other unknown value).

This commit also implements special-case behavior for param _tuple
types, which have their tuple elements' values encoded in the
QualifiedTypes of the TupleType, but not stored into a Param*.

There is discussion in dyno: representing `param` tuples in vararg functions and beyond · Issue #20487 · chapel-lang/chapel · GitHub
about how to properly represent param tuples. It is likely that in the
event that we add param tuples to Dyno, we will settle on a representation
that includes a special Param that contains tuple values. This would
preclude the need for special-case handling in isUnknown. In the meantime,
though, we don't have Param tuples (and they're not in the production compiler),
so this workaround seems appropriate.

Reviewed by @benharsh - thanks!

TESTING:

  • Paratest. some failures on this branch are fixed on main, but nothing
    otherwise.

Signed-off-by: Danila Fedorin daniel.fedorin@hpe.com

Modified Files:
M compiler/dyno/include/chpl/types/QualifiedType.h

M compiler/dyno/include/chpl/types/TupleType.h
M compiler/dyno/lib/resolution/Resolver.cpp
M compiler/dyno/lib/resolution/can-pass.cpp
M compiler/dyno/lib/types/QualifiedType.cpp
M compiler/dyno/lib/types/TupleType.cpp
M compiler/dyno/test/resolution/testExprIf.cpp

Compare: https://github.com/chapel-lang/chapel/compare/fcadee41f157...1fc2ec952900