Branch: refs/heads/main
Revision: 195c457
Author: mppf
Link: Resolve and init modules mentioned on command line by mppf · Pull Request #18724 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #18724 from mppf/issue-18714
Resolve and init modules mentioned on command line
For #18714
Related to PR #13369
This PR
- resolves and arranges to run module init/deinit for any top-level
module mentioned on the command line - changes to setting FLAG_MODULE_FROM_COMMAND_LINE_FILE only for
top-level modules mentioned on the command line (not for nested
modules). To keep main-module inference working I needed to add a
helper function isModuleOrSubmoduleFromCommandLine in
ModuleSymbol.cpp. - removes currentFileNamedOnCommandLine and instead takes the approach
of setting on top-level modules parsed from command line files after
parsing. - updates a comment about how to add a flag since the flags are now in
the dyno library
Reviewed by @lydia-duncan - thanks!
-
[x] full local testing
Modified Files:
A test/modules/command-line/issue_18714_a.chpl
A test/modules/command-line/issue_18714_a.notest
A test/modules/command-line/issue_18714_b.chpl
A test/modules/command-line/issue_18714_b.compopts
A test/modules/command-line/issue_18714_b.good
A test/optimizations/deadCodeElimination/elliot/deadModuleElimAliveMod.chpl
A test/optimizations/deadCodeElimination/elliot/deadModuleElimAliveMod.notest
A test/optimizations/deadCodeElimination/elliot/deadModuleElimDeadMod.chpl
A test/optimizations/deadCodeElimination/elliot/deadModuleElimDeadMod.notest
A test/optimizations/deadCodeElimination/elliot/deadModuleElimDeadModWithDeadProc.chpl
A test/optimizations/deadCodeElimination/elliot/deadModuleElimDeadModWithDeadProc.notest
A test/performance/vectorization/vectorPragmas/loopsInForallNoVector.execgood
A test/performance/vectorization/vectorPragmas/zipIterNoVector.execgood
R test/modules/require/whichModsInit/bar.future
R test/modules/require/whichModsInit/baz.future
M compiler/AST/ModuleSymbol.cpp
M compiler/AST/build.cpp
M compiler/dyno/include/chpl/uast/PragmaList.h
M compiler/include/flags.h
M compiler/include/parser.h
M compiler/optimizations/deadCodeElimination.cpp
M compiler/parser/parser.cpp
M compiler/passes/buildDefaultFunctions.cpp
M compiler/passes/scopeResolve.cpp
M compiler/resolution/functionResolution.cpp
M test/extern/bradc/require/Foo.chpl
M test/extern/bradc/require/useModAsString.good
M test/extern/bradc/require/useModAsString2.good
M test/extern/bradc/require/useModAsString3.good
M test/extern/require/requireInTopMod.chpl
M test/extern/require/requireInTopMod.good
M test/modules/diten/main-module-flag/multiple_modules_no_main2.good
M test/modules/diten/main-module-flag/multiple_modules_no_main3.good
M test/modules/noakes/mod-init-fails.good
M test/modules/require/whichModsInit/bar.good
M test/modules/require/whichModsInit/baz.good
M test/modules/sungeun/no-use-class.good
M test/modules/sungeun/no-use-enum.good
M test/modules/sungeun/no-use-record.good
M test/modules/sungeun/no-use-type-alias.good
M test/modules/sungeun/resolution/module-resolution-issue.compopts
M test/modules/sungeun/resolution/module-resolution-issue.good
M test/optimizations/deadCodeElimination/elliot/deadModuleElim.chpl
M test/optimizations/deadCodeElimination/elliot/deadModuleElim.good
M test/performance/vectorization/vectorPragmas/PREDIFF
M test/performance/vectorization/vectorPragmas/loopsInForallNoVector.compgood
M test/performance/vectorization/vectorPragmas/zipIterNoVector.compgoodCompare: Comparing 00a019179178...195c457849f9 · chapel-lang/chapel · GitHub