Branch: refs/heads/master
Revision: 5a64b3b
Author: vasslitvinov
Log Message:
Merge pull request #17485 from vasslitvinov/list_view-intents
Reduce printing of arg intents in list_view()
Do not print argument intents when list_view()
prints a nested SymExpr
.
For example, before:
207067 fn myfun[207067]:_unknown[54]
207066 def unknown arg intent-default intent x[207065]:_any[181]
207070 def ref arg intent-'ref' y[207069]:_any[181]
207068 {
729133 def unknown call_tmp[729132]:_unknown[54]
729135 move( call_tmp[729132] call( * arg intent-default intent x[207065] 3 ) )
729138 def unknown call_tmp[729137]:_unknown[54]
729140 move( call_tmp[729137] call( + call_tmp[729132] arg intent-'ref' y[207069] ) )
207079 call( = arg intent-'ref' y[207069] call_tmp[729137] )
548128 return( _void[58] )
207068 }
vs. with this change:
207067 fn myfun[207067]:_unknown[54]
207066 def unknown arg intent-default intent x[207065]:_any[181]
207070 def ref arg intent-'ref' y[207069]:_any[181]
207068 {
729133 def unknown call_tmp[729132]:_unknown[54]
729135 move( call_tmp[729132] call( * x[207065] 3 ) )
729138 def unknown call_tmp[729137]:_unknown[54]
729140 move( call_tmp[729137] call( + call_tmp[729132] y[207069] ) )
207079 call( = y[207069] call_tmp[729137] )
548128 return( _void[58] )
207068 }
where x
and y
are now printed compactly.
When list_view()
is invoked directly on a SymExpr
of an ArgSymbol
,
the behavior remains the same: the intent is shown.
Discussed with the group.
Modified Files:
M compiler/AST/view.cpp
Compare: https://github.com/chapel-lang/chapel/compare/ff9b3a76ceac...5a64b3b7cdbb