Re: [PATCH 01/43] Replace the symbol needs evaluator with a parser

Zoran Zaric via Gdb-patches
2021-04-28T15:32:08Z

> Although that depends on the semantic we want symbol_needs to have:
>
> - find what's needed to evaluate the expression in the current context,
> only in the branch that would be taken right now?
> - find what's needed to evaluate the expression in any possible
> context, considering all branches?
>
> Simon
>

After thinking a bit more about it and speaking with Simon offline, I
realized that there is a bit more complexity here and I am not sure what
is the right answer to this question.

In the first case, if we decide to split the patchset in two, where
first part would be the general cleanup and the second would be the
evaluator redesign, it would make sense to go with the control flow idea
so that we have a more robust implementation at the end of first part.

For the second case, the control flow idea would be the only way to go,
but that would mean that it never goes back to the evaluator mechanism.

I am not sure how this mechanism is expected to work and considering
that the previous implementation didn't cover any of these two cases
properly, I am not sure what to do here.

The control flow implementation sounds easy to implement, but is that
what is expected? It also forces one more big switch statement that
parses the expression to be present.

Zoran