[Chapel Merge] dyno: More progress on scope resolution, fix bugs

Branch: refs/heads/main
Revision: 71e0fef
Author: dlongnecke-cray
Link: dyno: More progress on scope resolution, fix bugs in resolver by dlongnecke-cray · Pull Request #20281 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20281 from dlongnecke-cray/dyno-duplicate-decorators

dyno: More progress on scope resolution, fix bugs in resolver (#20281)

This PR continues the effort of PR #20228 to migrate scope resolution
to the dyno framework and fixes a few bugs in the dyno resolver.

[PR and message written by @mppf]

This PR:

  • marks TypeSymbols for decorated class types with FLAG_TEMP so that
    if they are created before the production scope resolve runs, the
    scope resolver will not report an error about symbols with the
    same name
  • adds parsing::idIsField to support the conversion
  • in the dyno type resolver, adjusts the types of formals for class
    methods like proc C.foo to be borrowed (vs any-management)
  • adjusts prepareCallInfoNormalCall to avoid unnecessary work if
    isMethodCall == true
  • fixes a bug when resolving method calls
  • fixes a bug when resolving a field access like this.T in the
    presence of a formal named T
  • improves the dump/stringify output for class types
  • adjusts convert-uast to only scope resolve user-level code if
    --dyno is provided (vs all internal modules)
  • adjusts convert-uast to convert scope resolved field access to
    the format the production compiler expects
  • adjusts convert-uast to adjust the types of formals for class
    methods like proc C.foo to be borrowed (vs any-management)
  • turns off tracing in the converter by default

TESTING

  • ALL on linux64, standard

Reviewed by @dlongnecke-cray, @DanilaFe. Thanks!

Signed-off-by: David Longnecker dlongnecke-cray@users.noreply.github.com

Modified Files:
A compiler/dyno/test/resolution/testClasses.cpp

M compiler/AST/AggregateType.cpp
M compiler/dyno/include/chpl/parsing/parsing-queries.h
M compiler/dyno/lib/parsing/parsing-queries.cpp
M compiler/dyno/lib/resolution/Resolver.cpp
M compiler/dyno/lib/resolution/resolution-queries.cpp
M compiler/dyno/lib/resolution/scope-queries.cpp
M compiler/dyno/lib/types/ClassType.cpp
M compiler/dyno/test/resolution/CMakeLists.txt
M compiler/dyno/test/resolution/testResolveMethodCalls.cpp
M compiler/passes/convert-uast.cpp

Compare: https://github.com/chapel-lang/chapel/compare/1f3cec64fd15...71e0fef45d20