Rename context_stack and make it private
"context_stack" has been misnamed at least since the storage was
changed to a std::vector, and arguably even since the very beginning.
This patch renames it to "lexical_context", which is a bit closer to
what is is for.
This type is also no longer used outside of buildsym itself -- callers
can now push and pop contexts, but they don't act on the context
object itself. So, the type is made private.
One benefit of this approach is that callers no longer need to be
quite as careful -- previously there was at least a possibility that a
context object pointer would be invalidated when pushing and popping
the stack.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
2 files changed