Lines Matching refs:arr

1204 desc_bounds (struct value *arr)
1206 struct type *type = ada_check_typedef (VALUE_TYPE (arr));
1220 addr = value_as_long (arr);
1222 addr = VALUE_ADDRESS (arr) + VALUE_OFFSET (arr);
1230 return value_struct_elt (&arr, NULL, "P_BOUNDS", NULL,
1283 desc_data (struct value *arr)
1285 struct type *type = VALUE_TYPE (arr);
1287 return thin_data_pntr (arr);
1289 return value_struct_elt (&arr, NULL, "P_ARRAY", NULL,
1453 ada_type_of_array (struct value *arr, int bounds)
1455 if (ada_is_packed_array_type (VALUE_TYPE (arr)))
1456 return decode_packed_array_type (VALUE_TYPE (arr));
1458 if (!ada_is_array_descriptor_type (VALUE_TYPE (arr)))
1459 return VALUE_TYPE (arr);
1463 ada_check_typedef (TYPE_TARGET_TYPE (desc_data_type (VALUE_TYPE (arr))));
1469 struct objfile *objf = TYPE_OBJFILE (VALUE_TYPE (arr));
1471 elt_type = ada_array_element_type (VALUE_TYPE (arr), -1);
1472 arity = ada_array_arity (VALUE_TYPE (arr));
1475 return ada_check_typedef (VALUE_TYPE (arr));
1477 descriptor = desc_bounds (arr);
1504 ada_coerce_to_simple_array_ptr (struct value *arr)
1506 if (ada_is_array_descriptor_type (VALUE_TYPE (arr)))
1508 struct type *arrType = ada_type_of_array (arr, 1);
1511 return value_cast (arrType, value_copy (desc_data (arr)));
1513 else if (ada_is_packed_array_type (VALUE_TYPE (arr)))
1514 return decode_packed_array (arr);
1516 return arr;
1524 ada_coerce_to_simple_array (struct value *arr)
1526 if (ada_is_array_descriptor_type (VALUE_TYPE (arr)))
1528 struct value *arrVal = ada_coerce_to_simple_array_ptr (arr);
1533 else if (ada_is_packed_array_type (VALUE_TYPE (arr)))
1534 return decode_packed_array (arr);
1536 return arr;
1662 decode_packed_array (struct value *arr)
1666 arr = ada_coerce_ref (arr);
1667 if (TYPE_CODE (VALUE_TYPE (arr)) == TYPE_CODE_PTR)
1668 arr = ada_value_ind (arr);
1670 type = decode_packed_array_type (VALUE_TYPE (arr));
1677 if (BITS_BIG_ENDIAN && ada_is_modular_type (VALUE_TYPE (arr)))
1686 mod = ada_modulus (VALUE_TYPE (arr)) - 1;
1693 bit_pos = HOST_CHAR_BIT * TYPE_LENGTH (VALUE_TYPE (arr)) - bit_size;
1694 arr = ada_value_primitive_packed_val (arr, NULL,
1701 return coerce_unspec_val_to_type (arr, type);
1709 value_subscript_packed (struct value *arr, int arity, struct value **ind)
1719 elt_type = ada_check_typedef (VALUE_TYPE (arr));
1749 v = ada_value_primitive_packed_val (arr, NULL, elt_off, bit_off,
1751 if (VALUE_LVAL (arr) == lval_internalvar)
1754 VALUE_LVAL (v) = VALUE_LVAL (arr);
2056 ada_value_subscript (struct value *arr, int arity, struct value **ind)
2062 elt = ada_coerce_to_simple_array (arr);
2083 ada_value_ptr_subscript (struct value *arr, struct type *type, int arity,
2095 arr = value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
2096 value_copy (arr));
2101 arr = value_add (arr, idx);
2105 return value_ind (arr);
2140 descriptor, returns the number of dimensions for type. If arr is a
2244 /* Given that arr is an array type, returns the lower bound of the
2310 /* Given that arr is an array value, returns the lower bound of the
2316 ada_array_bound (struct value *arr, int n, int which)
2318 struct type *arr_type = VALUE_TYPE (arr);
2321 return ada_array_bound (decode_packed_array (arr), n, which);
2329 return desc_one_bound (desc_bounds (arr), n, which);
2332 /* Given that arr is an array value, returns the length of the
2339 ada_array_length (struct value *arr, int n)
2341 struct type *arr_type = ada_check_typedef (VALUE_TYPE (arr));
2344 return ada_array_length (decode_packed_array (arr), n);
2357 value_as_long (desc_one_bound (desc_bounds (arr),
2359 - value_as_long (desc_one_bound (desc_bounds (arr),
3565 make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp)
3573 for (i = ada_array_arity (ada_check_typedef (VALUE_TYPE (arr))); i > 0; i -= 1)
3576 value_as_long (ada_array_bound (arr, i, 0)),
3580 value_as_long (ada_array_bound (arr, i, 1)),
3588 VALUE_ADDRESS (ensure_lval (arr, sp)),