diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-08 07:27:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-08 07:28:40 -0700 |
commit | 5871f0a38dd0f2403765e60d7b00f511fcc4a6cc (patch) | |
tree | 86943a8771a5d2b1966e5152acd76047c5321f3a /gdb | |
parent | a99be8c199c2cbfae137fb5a54151e781ecb7ec3 (diff) | |
download | gdb-5871f0a38dd0f2403765e60d7b00f511fcc4a6cc.zip gdb-5871f0a38dd0f2403765e60d7b00f511fcc4a6cc.tar.gz gdb-5871f0a38dd0f2403765e60d7b00f511fcc4a6cc.tar.bz2 |
Remove now-unused Modula-2 evaluator code
Now that the Modula-2 parser has switched to the new style, there is
no need for the old Modula-2 evaluation code.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* m2-lang.h (class m2_language) <expresssion_ops,
exp_descriptor_modula2>: Remove.
* m2-lang.c (evaluate_subexp_modula2)
(m2_language::exp_descriptor_modula2): Remove.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/m2-lang.c | 34 | ||||
-rw-r--r-- | gdb/m2-lang.h | 9 |
3 files changed, 7 insertions, 43 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f63c361..a0dde3f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2021-03-08 Tom Tromey <tom@tromey.com> + * m2-lang.h (class m2_language) <expresssion_ops, + exp_descriptor_modula2>: Remove. + * m2-lang.c (evaluate_subexp_modula2) + (m2_language::exp_descriptor_modula2): Remove. + +2021-03-08 Tom Tromey <tom@tromey.com> + * f-lang.h (class f_language) <expresssion_ops>: Remove. <exp_descriptor_tab>: Remove. * f-lang.c (fortran_value_subarray, evaluate_subexp_f) diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index e286613..36b15c3 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -111,31 +111,6 @@ eval_op_m2_subscript (struct type *expect_type, struct expression *exp, return value_subscript (arg1, value_as_long (arg2)); } -static struct value * -evaluate_subexp_modula2 (struct type *expect_type, struct expression *exp, - int *pos, enum noside noside) -{ - enum exp_opcode op = exp->elts[*pos].opcode; - struct value *arg1; - struct value *arg2; - - switch (op) - { - case UNOP_HIGH: - (*pos)++; - arg1 = evaluate_subexp_with_coercion (exp, pos, noside); - return eval_op_m2_high (expect_type, exp, noside, arg1); - - case BINOP_SUBSCRIPT: - (*pos)++; - arg1 = evaluate_subexp_with_coercion (exp, pos, noside); - arg2 = evaluate_subexp_with_coercion (exp, pos, noside); - return eval_op_m2_subscript (expect_type, exp, noside, arg1, arg2); - - default: - return evaluate_subexp_standard (expect_type, exp, pos, noside); - } -} /* Table of operators and their precedences for printing expressions. */ @@ -175,15 +150,6 @@ const struct op_print m2_language::op_print_tab[] = }; -const struct exp_descriptor m2_language::exp_descriptor_modula2 = -{ - print_subexp_standard, - operator_length_standard, - operator_check_standard, - dump_subexp_body_standard, - evaluate_subexp_modula2 -}; - /* Single instance of the M2 language. */ static m2_language m2_language_defn; diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h index 650942b..2094142 100644 --- a/gdb/m2-lang.h +++ b/gdb/m2-lang.h @@ -150,19 +150,10 @@ public: /* See language.h. */ - const struct exp_descriptor *expression_ops () const override - { return &exp_descriptor_modula2; } - - /* See language.h. */ - const struct op_print *opcode_print_table () const override { return op_print_tab; } private: - /* Table of expression handling functions for use by EXPRESSION_OPS - member function. */ - static const struct exp_descriptor exp_descriptor_modula2; - /* Table of opcode data for use by OPCODE_PRINT_TABLE member function. */ static const struct op_print op_print_tab[]; }; |