[Chapel Merge] dyno: add input type to reduce uAST node

Branch: refs/heads/main
Revision: 59499c2
Author: arezaii
Link: dyno: add input type to reduce uAST node by arezaii · Pull Request #19686 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19686 from arezaii/reduce-input-type

dyno: add input type to reduce uAST node

This PR adds the ability for uAST Reduce nodes to store either an
input type or a simple identifier.

Previously, the uAST node for reduce did not allow for an input type
minmax(int) reduce x for example. This change removes the op_
field that stored a UniqueString. Instead, we store a child node
that is either an Identifier or a FnCall at index 1 in the list
of children.

The converter for uAST to AST and the Chapel syntax printer have been
updated to account for the changes to Reduce node.

TESTING:

  • [x] paratest
  • [x] parstest with --dyno (115 vs. 119 failures on main)

reviewed by @dlongnecke-cray - thanks!

Signed-off-by: arezaii ahmad.rezaii@hpe.com

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

M compiler/dyno/lib/parsing/ParserContextImpl.h
M compiler/dyno/lib/parsing/bison-chpl-lib.cpp
M compiler/dyno/lib/parsing/chpl.ypp
M compiler/dyno/lib/parsing/flex-chpl-lib.cpp
M compiler/dyno/lib/parsing/flex-chpl-lib.h
M compiler/dyno/lib/uast/Reduce.cpp
M compiler/dyno/lib/uast/chpl-syntax-printer.cpp
M compiler/dyno/test/uast/testStringify.cpp
M compiler/passes/convert-uast.cpp

Compare: https://github.com/chapel-lang/chapel/compare/f8e4625ae957...59499c273f11