diff options
author | Tom Tromey <tom@tromey.com> | 2021-02-18 11:23:33 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-02-18 11:23:33 -0700 |
commit | 26f53cd385fab9dabec50b4a7be07041db929417 (patch) | |
tree | 6d2258f411863eef11e07cb01623db51ab7e4fed /binutils | |
parent | 8568422270e312310c47048750733652c7bd979f (diff) | |
download | binutils-26f53cd385fab9dabec50b4a7be07041db929417.zip binutils-26f53cd385fab9dabec50b4a7be07041db929417.tar.gz binutils-26f53cd385fab9dabec50b4a7be07041db929417.tar.bz2 |
Introduce expression::evaluate
This introduces a new method, expression::evaluate, and changes the
top-level expression-evaluation functions to use it. Stack temporary
handling is moved into this new method, which makes sense because that
handling was only done when "*pos == 0".
This patch avoids some temporary regressions related to stack
temporary in the larger expression rewrite series. I've pulled it out
separately because it seems like a reasonable change in its own right,
and because it's better to avoid making that series even longer.
Regression tested on x86-64 Fedora 32.
gdb/ChangeLog
2021-02-18 Tom Tromey <tom@tromey.com>
* expression.h (struct expression) <evaluate>: Declare method.
* eval.c (evaluate_subexp): Simplify.
(expression::evaluate): New method.
(evaluate_expression, evaluate_type): Use expression::evaluate.
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions