Re: [RFA v2 15/17] Convert DWARF expr functions to methods

Pedro Alves
2016-10-13T23:01:20Z

On 10/13/2016 10:10 PM, Tom Tromey wrote:
> This converts various DWARF expr functions to be members on
> dwarf_expr_context, then fixes up the various users. This results in
> somewhat less wordy code and sets the stage for the next patch.
>

LGTM.

> @@ -122,28 +117,27 @@ dwarf_expr_context::~dwarf_expr_context ()
> /* Expand the memory allocated to CTX's stack to contain at least
> NEED more elements than are currently used. */

I notice that several of the intro comments to functions that
are now methods still talk about CTX. Should they be
tweaked? Maybe to "to this context's stack". Or maybe they're clear
as is anyway.

>
> -static void
> -dwarf_expr_grow_stack (struct dwarf_expr_context *ctx, size_t need)
> +void
> +dwarf_expr_context::grow_stack (size_t need)
> {

Thanks,
Pedro Alves