> One thing to keep in mind is that removing support for named references to subscripted variables could be as simple as forbidding the definition of such named references.
Following is a quick patch to do just that.
Just a quick fyi: In the meantime I created a patch that removes the support for named references to subscripted variables and all the associated code and tests. There are a few more details I would like to check. I'll try to publish it later today or tomorrow.
Those three patches have now been committed and pushed.
Thanks, that's great news!
These two have not, because I want to look harder at the necessity in
54047 to introduce another global-scope linked list.
I was wondering the same. One idea would be to piggyback on the global parameter tab. We could have fake variables named "#scoperefs-at-level-<N>" that point to the named references in the scope at level N. The problem is that the parameter table points to a single parameter, not a list of parameters (and we can reuse/abuse the "old" field because it's already used by named references). A list could be stored by adding a new field to "struct param" but that feels overkill to me because that field would only be used in a very tiny fraction of all parameters ever created.
Or could we use multiple fake variables per scope named "#scoperef-<M>-at-level-<N>"? I fear that this would become messy and we would probably also need a fake variable to store the number of references in a given scope.
Other ideas? Are there other global variables we could piggyback on?
Philippe