mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 12:37:05 +08:00
* ch-exp.y (value_string_element, string_primitive_value,
start_element, left_element, right_element, slice_size, lower_element, upper_element, first_element): Removed. (value_string_slice, value_array_slice): Replaced by ... (slice): New non-terminal, with working slice support. (primitive_value_lparen, rparen): New non-terminals. (maybe_tuple_elements): New non-terminal, to allow empty tuples. (idtokentab): Added "up". * value.h (COERCE_VARYING_ARRAY): New macro. * valarith.c (value_subscript): Use it. * valops.c (value_cast): Likewise. Also, do nothing if already correct type, and allow converting from/to range to/from scalar. * valops.c, value.h (varying_to_slice, value_slice): New functions. * eval.c (OP_ARRAY): Add cast for array element. * expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT): New exp_opcodes. * valops.c (chill_varying_type): Moved function frp, here ... * gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here. * parse.c (length_of_subexp, prefixify_subexp): Add support for TERNOP_SLICE, TERNOP_SLICE_COUNT. * expprint.c (print_subexp, dump_expression): Likewise. * eval.c (evaluate_subexp): Likewise. * eval.c (evaluate_subexp case MULTI_SUBSCRIPT): Don't call value_x_binop on a Chill varying string.
This commit is contained in:
@ -535,6 +535,8 @@ length_of_subexp (expr, endpos)
|
||||
break;
|
||||
|
||||
case TERNOP_COND:
|
||||
case TERNOP_SLICE:
|
||||
case TERNOP_SLICE_COUNT:
|
||||
args = 3;
|
||||
break;
|
||||
|
||||
@ -677,6 +679,8 @@ prefixify_subexp (inexpr, outexpr, inend, outbeg)
|
||||
break;
|
||||
|
||||
case TERNOP_COND:
|
||||
case TERNOP_SLICE:
|
||||
case TERNOP_SLICE_COUNT:
|
||||
args = 3;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user