Use new+delete for struct expression
In another series I'm working on, it is necessary to manage
"struct expression" with new and delete. Because the patch is
straightforward and could be extracted, I've done so here.
gdb/ChangeLog
2020-12-01 Tom Tromey <tom@tromey.com>
* parse.c (expr_builder::expr_builder): Initialize expout.
(expr_builder::release): Use expression::resize.
(expression::expression, expression::~expression)
(expression::resize): New methods.
(write_exp_elt): Use expression::resize.
(prefixify_expression): Update.
(increase_expout_size): Use expression::resize.
* expression.h (struct expression): Add constructor, destructor.
<resize>: New method.
(expression_up): Change type.