diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/breakpoint.c | 1 | ||||
-rw-r--r-- | gdb/eval.c | 48 | ||||
-rw-r--r-- | gdb/expprint.c | 1 | ||||
-rw-r--r-- | gdb/std-operator.def | 4 |
5 files changed, 12 insertions, 50 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7cd8ada..0f258a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2014-07-20 Yao Qi <yao@codesourcery.com> + * std-operator.def: Remove BINOP_RANGE. + * breakpoint.c (watchpoint_exp_is_const): Update. + * expprint.c (dump_subexp_body_standard): Likewise. + * eval.c (init_array_element): Remove dead code. + (evaluate_subexp_standard): Likewise. + +2014-07-20 Yao Qi <yao@codesourcery.com> + * std-operator.def: Remove BINOP_IN. * breakpoint.c (watchpoint_exp_is_const): Update. * eval.c (evaluate_subexp_standard): Likewise. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index bad375b..1c6070f 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10602,7 +10602,6 @@ watchpoint_exp_is_const (const struct expression *exp) case BINOP_MAX: case BINOP_INTDIV: case BINOP_CONCAT: - case BINOP_RANGE: case TERNOP_COND: case TERNOP_SLICE: @@ -369,22 +369,6 @@ init_array_element (struct value *array, struct value *element, return init_array_element (array, element, exp, pos, noside, low_bound, high_bound); } - else if (exp->elts[*pos].opcode == BINOP_RANGE) - { - LONGEST low, high; - - (*pos)++; - low = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); - high = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); - if (low < low_bound || high > high_bound) - error (_("tuple range index out of range")); - for (index = low; index <= high; index++) - { - memcpy (value_contents_raw (array) - + (index - low_bound) * element_size, - value_contents (element), element_size); - } - } else { index = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); @@ -903,11 +887,6 @@ evaluate_subexp_standard (struct type *expect_type, struct value *element; int index_pc = 0; - if (exp->elts[*pos].opcode == BINOP_RANGE) - { - index_pc = ++(*pos); - evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP); - } element = evaluate_subexp (element_type, exp, pos, noside); if (value_type (element) != element_type) element = value_cast (element_type, element); @@ -958,22 +937,10 @@ evaluate_subexp_standard (struct type *expect_type, struct type *range_low_type, *range_high_type; struct value *elem_val; - if (exp->elts[*pos].opcode == BINOP_RANGE) - { - (*pos)++; - elem_val = evaluate_subexp (element_type, exp, pos, noside); - range_low_type = value_type (elem_val); - range_low = value_as_long (elem_val); - elem_val = evaluate_subexp (element_type, exp, pos, noside); - range_high_type = value_type (elem_val); - range_high = value_as_long (elem_val); - } - else - { - elem_val = evaluate_subexp (element_type, exp, pos, noside); - range_low_type = range_high_type = value_type (elem_val); - range_low = range_high = value_as_long (elem_val); - } + elem_val = evaluate_subexp (element_type, exp, pos, noside); + range_low_type = range_high_type = value_type (elem_val); + range_low = range_high = value_as_long (elem_val); + /* Check types of elements to avoid mixture of elements from different types. Also check if type of element is "compatible" with element type of powerset. */ @@ -2127,13 +2094,6 @@ evaluate_subexp_standard (struct type *expect_type, } } - case BINOP_RANGE: - evaluate_subexp (NULL_TYPE, exp, pos, noside); - evaluate_subexp (NULL_TYPE, exp, pos, noside); - if (noside == EVAL_SKIP) - goto nosideret; - error (_("':' operator used in invalid context")); - case BINOP_SUBSCRIPT: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside); diff --git a/gdb/expprint.c b/gdb/expprint.c index 505bd48..7f58e4e 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -802,7 +802,6 @@ dump_subexp_body_standard (struct expression *exp, case BINOP_ASSIGN_MODIFY: case BINOP_VAL: case BINOP_CONCAT: - case BINOP_RANGE: case BINOP_END: case STRUCTOP_MEMBER: case STRUCTOP_MPTR: diff --git a/gdb/std-operator.def b/gdb/std-operator.def index 16014e0..c33a287 100644 --- a/gdb/std-operator.def +++ b/gdb/std-operator.def @@ -87,10 +87,6 @@ OP (BINOP_VAL) the second operand with itself that many times. */ OP (BINOP_CONCAT) -/* This is the "colon operator" used various places in (the - deleted) Chill. */ -OP (BINOP_RANGE) - /* This must be the highest BINOP_ value, for expprint.c. */ OP (BINOP_END) |