gdb: add accessors to struct dynamic_prop
Add setters, to ensure that the kind and value of the property are always kept in sync (a caller can't forget one or the other). Add getters, such that we can assert that when a caller accesses a data bit of the property, the property is indeed of the corresponding kind. Note that because of the way `struct dynamic_prop` is allocated currently, we can't make the `m_kind` and `m_data` fields private. That would make the type non-default-constructible, and we would have to call the constructor when allocating them. However, I still prefixed them with `m_` to indicate that they should not be accessed from outside the class (and also to be able to use the name `kind` for the method). gdb/ChangeLog: * gdbtypes.h (struct dynamic_prop) <kind, set_undefined, const_val, set_const_val, baton, set_locexpr, set_loclist, set_addr_offset, variant_parts, set_variant_parts, original_type, set_original_type>: New methods. <kind>: Rename to... <m_kind>: ... this. Update all users to use the new methods instead. <data>: Rename to... <m_data>: ... this. Update all users to use the new methods instead. Change-Id: Ib72a8eb440dfeb1a5421d0933334230d7f2478f9
This commit is contained in:
parent
7c6f271296
commit
8c2e4e0689
12 changed files with 183 additions and 135 deletions
|
@ -1,3 +1,16 @@
|
||||||
|
2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
|
||||||
|
const_val, set_const_val, baton, set_locexpr, set_loclist,
|
||||||
|
set_addr_offset, variant_parts, set_variant_parts,
|
||||||
|
original_type, set_original_type>: New methods.
|
||||||
|
<kind>: Rename to...
|
||||||
|
<m_kind>: ... this. Update all users to use the new methods
|
||||||
|
instead.
|
||||||
|
<data>: Rename to...
|
||||||
|
<m_data>: ... this. Update all users to use the new methods
|
||||||
|
instead.
|
||||||
|
|
||||||
2020-07-12 Simon Marchi <simon.marchi@efficios.com>
|
2020-07-12 Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
* gdbtypes.c (get_discrete_bounds): Return failure if
|
* gdbtypes.c (get_discrete_bounds): Return failure if
|
||||||
|
|
|
@ -779,13 +779,13 @@ print_record_field_types (struct type *type, struct type *outer_type,
|
||||||
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||||
if (prop != nullptr)
|
if (prop != nullptr)
|
||||||
{
|
{
|
||||||
if (prop->kind == PROP_TYPE)
|
if (prop->kind () == PROP_TYPE)
|
||||||
{
|
{
|
||||||
type = prop->data.original_type;
|
type = prop->original_type ();
|
||||||
prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||||
}
|
}
|
||||||
gdb_assert (prop->kind == PROP_VARIANT_PARTS);
|
gdb_assert (prop->kind () == PROP_VARIANT_PARTS);
|
||||||
print_record_field_types_dynamic (*prop->data.variant_parts,
|
print_record_field_types_dynamic (*prop->variant_parts (),
|
||||||
0, type->num_fields (),
|
0, type->num_fields (),
|
||||||
type, stream, show, level, flags);
|
type, stream, show, level, flags);
|
||||||
return type->num_fields ();
|
return type->num_fields ();
|
||||||
|
|
|
@ -774,7 +774,7 @@ read_array_type (struct ctf_context *ccp, ctf_id_t tid)
|
||||||
type = create_array_type (NULL, element_type, range_type);
|
type = create_array_type (NULL, element_type, range_type);
|
||||||
if (ar.ctr_nelems <= 1) /* Check if undefined upper bound. */
|
if (ar.ctr_nelems <= 1) /* Check if undefined upper bound. */
|
||||||
{
|
{
|
||||||
TYPE_HIGH_BOUND_KIND (range_type) = PROP_UNDEFINED;
|
range_type->bounds ()->high.set_undefined ();
|
||||||
TYPE_LENGTH (type) = 0;
|
TYPE_LENGTH (type) = 0;
|
||||||
TYPE_TARGET_STUB (type) = 1;
|
TYPE_TARGET_STUB (type) = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2589,12 +2589,12 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||||
if (frame == NULL && has_stack_frames ())
|
if (frame == NULL && has_stack_frames ())
|
||||||
frame = get_selected_frame (NULL);
|
frame = get_selected_frame (NULL);
|
||||||
|
|
||||||
switch (prop->kind)
|
switch (prop->kind ())
|
||||||
{
|
{
|
||||||
case PROP_LOCEXPR:
|
case PROP_LOCEXPR:
|
||||||
{
|
{
|
||||||
const struct dwarf2_property_baton *baton
|
const struct dwarf2_property_baton *baton
|
||||||
= (const struct dwarf2_property_baton *) prop->data.baton;
|
= (const struct dwarf2_property_baton *) prop->baton ();
|
||||||
gdb_assert (baton->property_type != NULL);
|
gdb_assert (baton->property_type != NULL);
|
||||||
|
|
||||||
if (dwarf2_locexpr_baton_eval (&baton->locexpr, frame, addr_stack,
|
if (dwarf2_locexpr_baton_eval (&baton->locexpr, frame, addr_stack,
|
||||||
|
@ -2636,7 +2636,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||||
case PROP_LOCLIST:
|
case PROP_LOCLIST:
|
||||||
{
|
{
|
||||||
struct dwarf2_property_baton *baton
|
struct dwarf2_property_baton *baton
|
||||||
= (struct dwarf2_property_baton *) prop->data.baton;
|
= (struct dwarf2_property_baton *) prop->baton ();
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
const gdb_byte *data;
|
const gdb_byte *data;
|
||||||
struct value *val;
|
struct value *val;
|
||||||
|
@ -2662,13 +2662,13 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_CONST:
|
case PROP_CONST:
|
||||||
*value = prop->data.const_val;
|
*value = prop->const_val ();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case PROP_ADDR_OFFSET:
|
case PROP_ADDR_OFFSET:
|
||||||
{
|
{
|
||||||
struct dwarf2_property_baton *baton
|
struct dwarf2_property_baton *baton
|
||||||
= (struct dwarf2_property_baton *) prop->data.baton;
|
= (struct dwarf2_property_baton *) prop->baton ();
|
||||||
const struct property_addr_info *pinfo;
|
const struct property_addr_info *pinfo;
|
||||||
struct value *val;
|
struct value *val;
|
||||||
|
|
||||||
|
@ -2708,13 +2708,13 @@ dwarf2_compile_property_to_c (string_file *stream,
|
||||||
struct symbol *sym)
|
struct symbol *sym)
|
||||||
{
|
{
|
||||||
struct dwarf2_property_baton *baton
|
struct dwarf2_property_baton *baton
|
||||||
= (struct dwarf2_property_baton *) prop->data.baton;
|
= (struct dwarf2_property_baton *) prop->baton ();
|
||||||
const gdb_byte *data;
|
const gdb_byte *data;
|
||||||
size_t size;
|
size_t size;
|
||||||
dwarf2_per_cu_data *per_cu;
|
dwarf2_per_cu_data *per_cu;
|
||||||
dwarf2_per_objfile *per_objfile;
|
dwarf2_per_objfile *per_objfile;
|
||||||
|
|
||||||
if (prop->kind == PROP_LOCEXPR)
|
if (prop->kind () == PROP_LOCEXPR)
|
||||||
{
|
{
|
||||||
data = baton->locexpr.data;
|
data = baton->locexpr.data;
|
||||||
size = baton->locexpr.size;
|
size = baton->locexpr.size;
|
||||||
|
@ -2723,7 +2723,7 @@ dwarf2_compile_property_to_c (string_file *stream,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gdb_assert (prop->kind == PROP_LOCLIST);
|
gdb_assert (prop->kind () == PROP_LOCLIST);
|
||||||
|
|
||||||
data = dwarf2_find_location_expression (&baton->loclist, &size, pc);
|
data = dwarf2_find_location_expression (&baton->loclist, &size, pc);
|
||||||
per_cu = baton->loclist.per_cu;
|
per_cu = baton->loclist.per_cu;
|
||||||
|
|
|
@ -9464,8 +9464,7 @@ alloc_rust_variant (struct obstack *obstack, struct type *type,
|
||||||
= new (storage) gdb::array_view<variant_part> (part, 1);
|
= new (storage) gdb::array_view<variant_part> (part, 1);
|
||||||
|
|
||||||
struct dynamic_prop prop;
|
struct dynamic_prop prop;
|
||||||
prop.kind = PROP_VARIANT_PARTS;
|
prop.set_variant_parts (prop_value);
|
||||||
prop.data.variant_parts = prop_value;
|
|
||||||
|
|
||||||
type->add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop);
|
type->add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop);
|
||||||
}
|
}
|
||||||
|
@ -14959,10 +14958,9 @@ add_variant_property (struct field_info *fip, struct type *type,
|
||||||
fip->variant_parts);
|
fip->variant_parts);
|
||||||
|
|
||||||
struct dynamic_prop prop;
|
struct dynamic_prop prop;
|
||||||
prop.kind = PROP_VARIANT_PARTS;
|
prop.set_variant_parts ((gdb::array_view<variant_part> *)
|
||||||
prop.data.variant_parts
|
obstack_copy (&objfile->objfile_obstack, &parts,
|
||||||
= ((gdb::array_view<variant_part> *)
|
sizeof (parts)));
|
||||||
obstack_copy (&objfile->objfile_obstack, &parts, sizeof (parts)));
|
|
||||||
|
|
||||||
type->add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop);
|
type->add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop);
|
||||||
}
|
}
|
||||||
|
@ -17138,8 +17136,7 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
{
|
{
|
||||||
struct dynamic_prop low_bound;
|
struct dynamic_prop low_bound;
|
||||||
|
|
||||||
low_bound.kind = PROP_CONST;
|
low_bound.set_const_val (1);
|
||||||
low_bound.data.const_val = 1;
|
|
||||||
range_type = create_range_type (NULL, index_type, &low_bound, &prop, 0);
|
range_type = create_range_type (NULL, index_type, &low_bound, &prop, 0);
|
||||||
}
|
}
|
||||||
char_type = language_string_char_type (cu->language_defn, gdbarch);
|
char_type = language_string_char_type (cu->language_defn, gdbarch);
|
||||||
|
@ -17646,9 +17643,9 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||||
baton->locexpr.is_reference = false;
|
baton->locexpr.is_reference = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
prop->data.baton = baton;
|
|
||||||
prop->kind = PROP_LOCEXPR;
|
prop->set_locexpr (baton);
|
||||||
gdb_assert (prop->data.baton != NULL);
|
gdb_assert (prop->baton () != NULL);
|
||||||
}
|
}
|
||||||
else if (attr->form_is_ref ())
|
else if (attr->form_is_ref ())
|
||||||
{
|
{
|
||||||
|
@ -17672,9 +17669,8 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||||
baton = XOBNEW (obstack, struct dwarf2_property_baton);
|
baton = XOBNEW (obstack, struct dwarf2_property_baton);
|
||||||
baton->property_type = die_type (target_die, target_cu);
|
baton->property_type = die_type (target_die, target_cu);
|
||||||
fill_in_loclist_baton (cu, &baton->loclist, target_attr);
|
fill_in_loclist_baton (cu, &baton->loclist, target_attr);
|
||||||
prop->data.baton = baton;
|
prop->set_loclist (baton);
|
||||||
prop->kind = PROP_LOCLIST;
|
gdb_assert (prop->baton () != NULL);
|
||||||
gdb_assert (prop->data.baton != NULL);
|
|
||||||
}
|
}
|
||||||
else if (target_attr->form_is_block ())
|
else if (target_attr->form_is_block ())
|
||||||
{
|
{
|
||||||
|
@ -17685,9 +17681,8 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||||
baton->locexpr.size = DW_BLOCK (target_attr)->size;
|
baton->locexpr.size = DW_BLOCK (target_attr)->size;
|
||||||
baton->locexpr.data = DW_BLOCK (target_attr)->data;
|
baton->locexpr.data = DW_BLOCK (target_attr)->data;
|
||||||
baton->locexpr.is_reference = true;
|
baton->locexpr.is_reference = true;
|
||||||
prop->data.baton = baton;
|
prop->set_locexpr (baton);
|
||||||
prop->kind = PROP_LOCEXPR;
|
gdb_assert (prop->baton () != NULL);
|
||||||
gdb_assert (prop->data.baton != NULL);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -17709,17 +17704,13 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||||
target_cu);
|
target_cu);
|
||||||
baton->offset_info.offset = offset;
|
baton->offset_info.offset = offset;
|
||||||
baton->offset_info.type = die_type (target_die, target_cu);
|
baton->offset_info.type = die_type (target_die, target_cu);
|
||||||
prop->data.baton = baton;
|
prop->set_addr_offset (baton);
|
||||||
prop->kind = PROP_ADDR_OFFSET;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (attr->form_is_constant ())
|
else if (attr->form_is_constant ())
|
||||||
{
|
prop->set_const_val (attr->constant_value (0));
|
||||||
prop->data.const_val = attr->constant_value (0);
|
|
||||||
prop->kind = PROP_CONST;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dwarf2_invalid_attrib_class_complaint (dwarf_form_name (attr->form),
|
dwarf2_invalid_attrib_class_complaint (dwarf_form_name (attr->form),
|
||||||
|
@ -17819,9 +17810,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
if (range_type)
|
if (range_type)
|
||||||
return range_type;
|
return range_type;
|
||||||
|
|
||||||
low.kind = PROP_CONST;
|
high.set_const_val (0);
|
||||||
high.kind = PROP_CONST;
|
|
||||||
high.data.const_val = 0;
|
|
||||||
|
|
||||||
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
|
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
|
||||||
omitting DW_AT_lower_bound. */
|
omitting DW_AT_lower_bound. */
|
||||||
|
@ -17829,27 +17818,27 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
{
|
{
|
||||||
case language_c:
|
case language_c:
|
||||||
case language_cplus:
|
case language_cplus:
|
||||||
low.data.const_val = 0;
|
low.set_const_val (0);
|
||||||
low_default_is_valid = 1;
|
low_default_is_valid = 1;
|
||||||
break;
|
break;
|
||||||
case language_fortran:
|
case language_fortran:
|
||||||
low.data.const_val = 1;
|
low.set_const_val (1);
|
||||||
low_default_is_valid = 1;
|
low_default_is_valid = 1;
|
||||||
break;
|
break;
|
||||||
case language_d:
|
case language_d:
|
||||||
case language_objc:
|
case language_objc:
|
||||||
case language_rust:
|
case language_rust:
|
||||||
low.data.const_val = 0;
|
low.set_const_val (0);
|
||||||
low_default_is_valid = (cu->header.version >= 4);
|
low_default_is_valid = (cu->header.version >= 4);
|
||||||
break;
|
break;
|
||||||
case language_ada:
|
case language_ada:
|
||||||
case language_m2:
|
case language_m2:
|
||||||
case language_pascal:
|
case language_pascal:
|
||||||
low.data.const_val = 1;
|
low.set_const_val (1);
|
||||||
low_default_is_valid = (cu->header.version >= 4);
|
low_default_is_valid = (cu->header.version >= 4);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
low.data.const_val = 0;
|
low.set_const_val (0);
|
||||||
low_default_is_valid = 0;
|
low_default_is_valid = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -17871,8 +17860,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
if (attr_to_dynamic_prop (attr, die, cu, &high, base_type))
|
if (attr_to_dynamic_prop (attr, die, cu, &high, base_type))
|
||||||
{
|
{
|
||||||
/* If bounds are constant do the final calculation here. */
|
/* If bounds are constant do the final calculation here. */
|
||||||
if (low.kind == PROP_CONST && high.kind == PROP_CONST)
|
if (low.kind () == PROP_CONST && high.kind () == PROP_CONST)
|
||||||
high.data.const_val = low.data.const_val + high.data.const_val - 1;
|
high.set_const_val (low.const_val () + high.const_val () - 1);
|
||||||
else
|
else
|
||||||
high_bound_is_count = 1;
|
high_bound_is_count = 1;
|
||||||
}
|
}
|
||||||
|
@ -17905,12 +17894,12 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
the base type is signed. */
|
the base type is signed. */
|
||||||
negative_mask =
|
negative_mask =
|
||||||
-((ULONGEST) 1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1));
|
-((ULONGEST) 1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1));
|
||||||
if (low.kind == PROP_CONST
|
if (low.kind () == PROP_CONST
|
||||||
&& !TYPE_UNSIGNED (base_type) && (low.data.const_val & negative_mask))
|
&& !TYPE_UNSIGNED (base_type) && (low.const_val () & negative_mask))
|
||||||
low.data.const_val |= negative_mask;
|
low.set_const_val (low.const_val () | negative_mask);
|
||||||
if (high.kind == PROP_CONST
|
if (high.kind () == PROP_CONST
|
||||||
&& !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
|
&& !TYPE_UNSIGNED (base_type) && (high.const_val () & negative_mask))
|
||||||
high.data.const_val |= negative_mask;
|
high.set_const_val (high.const_val () | negative_mask);
|
||||||
|
|
||||||
/* Check for bit and byte strides. */
|
/* Check for bit and byte strides. */
|
||||||
struct dynamic_prop byte_stride_prop;
|
struct dynamic_prop byte_stride_prop;
|
||||||
|
@ -17962,7 +17951,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
|
|
||||||
/* Ada expects an empty array on no boundary attributes. */
|
/* Ada expects an empty array on no boundary attributes. */
|
||||||
if (attr == NULL && cu->language != language_ada)
|
if (attr == NULL && cu->language != language_ada)
|
||||||
TYPE_HIGH_BOUND_KIND (range_type) = PROP_UNDEFINED;
|
range_type->bounds ()->high.set_undefined ();
|
||||||
|
|
||||||
name = dwarf2_name (die, cu);
|
name = dwarf2_name (die, cu);
|
||||||
if (name)
|
if (name)
|
||||||
|
|
|
@ -874,23 +874,23 @@ allocate_stub_method (struct type *type)
|
||||||
bool
|
bool
|
||||||
operator== (const dynamic_prop &l, const dynamic_prop &r)
|
operator== (const dynamic_prop &l, const dynamic_prop &r)
|
||||||
{
|
{
|
||||||
if (l.kind != r.kind)
|
if (l.kind () != r.kind ())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch (l.kind)
|
switch (l.kind ())
|
||||||
{
|
{
|
||||||
case PROP_UNDEFINED:
|
case PROP_UNDEFINED:
|
||||||
return true;
|
return true;
|
||||||
case PROP_CONST:
|
case PROP_CONST:
|
||||||
return l.data.const_val == r.data.const_val;
|
return l.const_val () == r.const_val ();
|
||||||
case PROP_ADDR_OFFSET:
|
case PROP_ADDR_OFFSET:
|
||||||
case PROP_LOCEXPR:
|
case PROP_LOCEXPR:
|
||||||
case PROP_LOCLIST:
|
case PROP_LOCLIST:
|
||||||
return l.data.baton == r.data.baton;
|
return l.baton () == r.baton ();
|
||||||
case PROP_VARIANT_PARTS:
|
case PROP_VARIANT_PARTS:
|
||||||
return l.data.variant_parts == r.data.variant_parts;
|
return l.variant_parts () == r.variant_parts ();
|
||||||
case PROP_TYPE:
|
case PROP_TYPE:
|
||||||
return l.data.original_type == r.data.original_type;
|
return l.original_type () == r.original_type ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_assert_not_reached ("unhandled dynamic_prop kind");
|
gdb_assert_not_reached ("unhandled dynamic_prop kind");
|
||||||
|
@ -940,21 +940,18 @@ create_range_type (struct type *result_type, struct type *index_type,
|
||||||
bounds->low = *low_bound;
|
bounds->low = *low_bound;
|
||||||
bounds->high = *high_bound;
|
bounds->high = *high_bound;
|
||||||
bounds->bias = bias;
|
bounds->bias = bias;
|
||||||
|
bounds->stride.set_const_val (0);
|
||||||
/* Initialize the stride to be a constant, the value will already be zero
|
|
||||||
thanks to the use of TYPE_ZALLOC above. */
|
|
||||||
bounds->stride.kind = PROP_CONST;
|
|
||||||
|
|
||||||
result_type->set_bounds (bounds);
|
result_type->set_bounds (bounds);
|
||||||
|
|
||||||
if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0)
|
if (low_bound->kind () == PROP_CONST && low_bound->const_val () >= 0)
|
||||||
TYPE_UNSIGNED (result_type) = 1;
|
TYPE_UNSIGNED (result_type) = 1;
|
||||||
|
|
||||||
/* Ada allows the declaration of range types whose upper bound is
|
/* Ada allows the declaration of range types whose upper bound is
|
||||||
less than the lower bound, so checking the lower bound is not
|
less than the lower bound, so checking the lower bound is not
|
||||||
enough. Make sure we do not mark a range type whose upper bound
|
enough. Make sure we do not mark a range type whose upper bound
|
||||||
is negative as unsigned. */
|
is negative as unsigned. */
|
||||||
if (high_bound->kind == PROP_CONST && high_bound->data.const_val < 0)
|
if (high_bound->kind () == PROP_CONST && high_bound->const_val () < 0)
|
||||||
TYPE_UNSIGNED (result_type) = 0;
|
TYPE_UNSIGNED (result_type) = 0;
|
||||||
|
|
||||||
TYPE_ENDIANITY_NOT_DEFAULT (result_type)
|
TYPE_ENDIANITY_NOT_DEFAULT (result_type)
|
||||||
|
@ -1002,11 +999,8 @@ create_static_range_type (struct type *result_type, struct type *index_type,
|
||||||
{
|
{
|
||||||
struct dynamic_prop low, high;
|
struct dynamic_prop low, high;
|
||||||
|
|
||||||
low.kind = PROP_CONST;
|
low.set_const_val (low_bound);
|
||||||
low.data.const_val = low_bound;
|
high.set_const_val (high_bound);
|
||||||
|
|
||||||
high.kind = PROP_CONST;
|
|
||||||
high.data.const_val = high_bound;
|
|
||||||
|
|
||||||
result_type = create_range_type (result_type, index_type, &low, &high, 0);
|
result_type = create_range_type (result_type, index_type, &low, &high, 0);
|
||||||
|
|
||||||
|
@ -1021,9 +1015,9 @@ has_static_range (const struct range_bounds *bounds)
|
||||||
{
|
{
|
||||||
/* If the range doesn't have a defined stride then its stride field will
|
/* If the range doesn't have a defined stride then its stride field will
|
||||||
be initialized to the constant 0. */
|
be initialized to the constant 0. */
|
||||||
return (bounds->low.kind == PROP_CONST
|
return (bounds->low.kind () == PROP_CONST
|
||||||
&& bounds->high.kind == PROP_CONST
|
&& bounds->high.kind () == PROP_CONST
|
||||||
&& bounds->stride.kind == PROP_CONST);
|
&& bounds->stride.kind () == PROP_CONST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1273,13 +1267,13 @@ create_array_type_with_stride (struct type *result_type,
|
||||||
unsigned int bit_stride)
|
unsigned int bit_stride)
|
||||||
{
|
{
|
||||||
if (byte_stride_prop != NULL
|
if (byte_stride_prop != NULL
|
||||||
&& byte_stride_prop->kind == PROP_CONST)
|
&& byte_stride_prop->kind () == PROP_CONST)
|
||||||
{
|
{
|
||||||
/* The byte stride is actually not dynamic. Pretend we were
|
/* The byte stride is actually not dynamic. Pretend we were
|
||||||
called with bit_stride set instead of byte_stride_prop.
|
called with bit_stride set instead of byte_stride_prop.
|
||||||
This will give us the same result type, while avoiding
|
This will give us the same result type, while avoiding
|
||||||
the need to handle this as a special case. */
|
the need to handle this as a special case. */
|
||||||
bit_stride = byte_stride_prop->data.const_val * 8;
|
bit_stride = byte_stride_prop->const_val () * 8;
|
||||||
byte_stride_prop = NULL;
|
byte_stride_prop = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1967,7 +1961,7 @@ array_type_has_dynamic_stride (struct type *type)
|
||||||
{
|
{
|
||||||
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_BYTE_STRIDE);
|
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_BYTE_STRIDE);
|
||||||
|
|
||||||
return (prop != NULL && prop->kind != PROP_CONST);
|
return (prop != NULL && prop->kind () != PROP_CONST);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Worker for is_dynamic_type. */
|
/* Worker for is_dynamic_type. */
|
||||||
|
@ -1999,7 +1993,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||||
if (prop != nullptr && prop->kind != PROP_TYPE)
|
if (prop != nullptr && prop->kind () != PROP_TYPE)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (TYPE_HAS_DYNAMIC_LENGTH (type))
|
if (TYPE_HAS_DYNAMIC_LENGTH (type))
|
||||||
|
@ -2097,38 +2091,27 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||||
|
|
||||||
const struct dynamic_prop *prop = &dyn_range_type->bounds ()->low;
|
const struct dynamic_prop *prop = &dyn_range_type->bounds ()->low;
|
||||||
if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||||
{
|
low_bound.set_const_val (value);
|
||||||
low_bound.kind = PROP_CONST;
|
|
||||||
low_bound.data.const_val = value;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
low_bound.set_undefined ();
|
||||||
low_bound.kind = PROP_UNDEFINED;
|
|
||||||
low_bound.data.const_val = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
prop = &dyn_range_type->bounds ()->high;
|
prop = &dyn_range_type->bounds ()->high;
|
||||||
if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||||
{
|
{
|
||||||
high_bound.kind = PROP_CONST;
|
high_bound.set_const_val (value);
|
||||||
high_bound.data.const_val = value;
|
|
||||||
|
|
||||||
if (dyn_range_type->bounds ()->flag_upper_bound_is_count)
|
if (dyn_range_type->bounds ()->flag_upper_bound_is_count)
|
||||||
high_bound.data.const_val
|
high_bound.set_const_val
|
||||||
= low_bound.data.const_val + high_bound.data.const_val - 1;
|
(low_bound.const_val () + high_bound.const_val () - 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
high_bound.set_undefined ();
|
||||||
high_bound.kind = PROP_UNDEFINED;
|
|
||||||
high_bound.data.const_val = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool byte_stride_p = dyn_range_type->bounds ()->flag_is_byte_stride;
|
bool byte_stride_p = dyn_range_type->bounds ()->flag_is_byte_stride;
|
||||||
prop = &dyn_range_type->bounds ()->stride;
|
prop = &dyn_range_type->bounds ()->stride;
|
||||||
if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||||
{
|
{
|
||||||
stride.kind = PROP_CONST;
|
stride.set_const_val (value);
|
||||||
stride.data.const_val = value;
|
|
||||||
|
|
||||||
/* If we have a bit stride that is not an exact number of bytes then
|
/* If we have a bit stride that is not an exact number of bytes then
|
||||||
I really don't think this is going to work with current GDB, the
|
I really don't think this is going to work with current GDB, the
|
||||||
|
@ -2142,8 +2125,7 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stride.kind = PROP_UNDEFINED;
|
stride.set_undefined ();
|
||||||
stride.data.const_val = 0;
|
|
||||||
byte_stride_p = true;
|
byte_stride_p = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2188,16 +2170,11 @@ resolve_dynamic_array_or_string (struct type *type,
|
||||||
will update the length of the array accordingly. */
|
will update the length of the array accordingly. */
|
||||||
prop = TYPE_ALLOCATED_PROP (type);
|
prop = TYPE_ALLOCATED_PROP (type);
|
||||||
if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||||
{
|
prop->set_const_val (value);
|
||||||
TYPE_DYN_PROP_ADDR (prop) = value;
|
|
||||||
TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
|
|
||||||
}
|
|
||||||
prop = TYPE_ASSOCIATED_PROP (type);
|
prop = TYPE_ASSOCIATED_PROP (type);
|
||||||
if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||||
{
|
prop->set_const_val (value);
|
||||||
TYPE_DYN_PROP_ADDR (prop) = value;
|
|
||||||
TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
|
|
||||||
}
|
|
||||||
|
|
||||||
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
|
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
|
||||||
|
|
||||||
|
@ -2447,14 +2424,13 @@ resolve_dynamic_struct (struct type *type,
|
||||||
resolved_type = copy_type (type);
|
resolved_type = copy_type (type);
|
||||||
|
|
||||||
dynamic_prop *variant_prop = resolved_type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
dynamic_prop *variant_prop = resolved_type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||||
if (variant_prop != nullptr && variant_prop->kind == PROP_VARIANT_PARTS)
|
if (variant_prop != nullptr && variant_prop->kind () == PROP_VARIANT_PARTS)
|
||||||
{
|
{
|
||||||
compute_variant_fields (type, resolved_type, addr_stack,
|
compute_variant_fields (type, resolved_type, addr_stack,
|
||||||
*variant_prop->data.variant_parts);
|
*variant_prop->variant_parts ());
|
||||||
/* We want to leave the property attached, so that the Rust code
|
/* We want to leave the property attached, so that the Rust code
|
||||||
can tell whether the type was originally an enum. */
|
can tell whether the type was originally an enum. */
|
||||||
variant_prop->kind = PROP_TYPE;
|
variant_prop->set_original_type (type);
|
||||||
variant_prop->data.original_type = type;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2483,8 +2459,7 @@ resolve_dynamic_struct (struct type *type,
|
||||||
baton.locexpr = *TYPE_FIELD_DWARF_BLOCK (resolved_type, i);
|
baton.locexpr = *TYPE_FIELD_DWARF_BLOCK (resolved_type, i);
|
||||||
|
|
||||||
struct dynamic_prop prop;
|
struct dynamic_prop prop;
|
||||||
prop.kind = PROP_LOCEXPR;
|
prop.set_locexpr (&baton);
|
||||||
prop.data.baton = &baton;
|
|
||||||
|
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
if (dwarf2_evaluate_property (&prop, nullptr, addr_stack, &addr,
|
if (dwarf2_evaluate_property (&prop, nullptr, addr_stack, &addr,
|
||||||
|
@ -2642,10 +2617,7 @@ resolve_dynamic_type_internal (struct type *type,
|
||||||
prop = TYPE_DATA_LOCATION (resolved_type);
|
prop = TYPE_DATA_LOCATION (resolved_type);
|
||||||
if (prop != NULL
|
if (prop != NULL
|
||||||
&& dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
&& dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||||
{
|
prop->set_const_val (value);
|
||||||
TYPE_DYN_PROP_ADDR (prop) = value;
|
|
||||||
TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
|
|
||||||
}
|
|
||||||
|
|
||||||
return resolved_type;
|
return resolved_type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -511,11 +511,87 @@ union dynamic_prop_data
|
||||||
|
|
||||||
struct dynamic_prop
|
struct dynamic_prop
|
||||||
{
|
{
|
||||||
|
dynamic_prop_kind kind () const
|
||||||
|
{
|
||||||
|
return m_kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_undefined ()
|
||||||
|
{
|
||||||
|
m_kind = PROP_UNDEFINED;
|
||||||
|
}
|
||||||
|
|
||||||
|
LONGEST const_val () const
|
||||||
|
{
|
||||||
|
gdb_assert (m_kind == PROP_CONST);
|
||||||
|
|
||||||
|
return m_data.const_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_const_val (LONGEST const_val)
|
||||||
|
{
|
||||||
|
m_kind = PROP_CONST;
|
||||||
|
m_data.const_val = const_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *baton () const
|
||||||
|
{
|
||||||
|
gdb_assert (m_kind == PROP_LOCEXPR
|
||||||
|
|| m_kind == PROP_LOCLIST
|
||||||
|
|| m_kind == PROP_ADDR_OFFSET);
|
||||||
|
|
||||||
|
return m_data.baton;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_locexpr (void *baton)
|
||||||
|
{
|
||||||
|
m_kind = PROP_LOCEXPR;
|
||||||
|
m_data.baton = baton;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_loclist (void *baton)
|
||||||
|
{
|
||||||
|
m_kind = PROP_LOCLIST;
|
||||||
|
m_data.baton = baton;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_addr_offset (void *baton)
|
||||||
|
{
|
||||||
|
m_kind = PROP_ADDR_OFFSET;
|
||||||
|
m_data.baton = baton;
|
||||||
|
}
|
||||||
|
|
||||||
|
const gdb::array_view<variant_part> *variant_parts () const
|
||||||
|
{
|
||||||
|
gdb_assert (m_kind == PROP_VARIANT_PARTS);
|
||||||
|
|
||||||
|
return m_data.variant_parts;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_variant_parts (gdb::array_view<variant_part> *variant_parts)
|
||||||
|
{
|
||||||
|
m_kind = PROP_VARIANT_PARTS;
|
||||||
|
m_data.variant_parts = variant_parts;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct type *original_type () const
|
||||||
|
{
|
||||||
|
gdb_assert (m_kind == PROP_TYPE);
|
||||||
|
|
||||||
|
return m_data.original_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_original_type (struct type *original_type)
|
||||||
|
{
|
||||||
|
m_kind = PROP_TYPE;
|
||||||
|
m_data.original_type = original_type;
|
||||||
|
}
|
||||||
|
|
||||||
/* Determine which field of the union dynamic_prop.data is used. */
|
/* Determine which field of the union dynamic_prop.data is used. */
|
||||||
enum dynamic_prop_kind kind;
|
enum dynamic_prop_kind m_kind;
|
||||||
|
|
||||||
/* Storage for dynamic or static value. */
|
/* Storage for dynamic or static value. */
|
||||||
union dynamic_prop_data data;
|
union dynamic_prop_data m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Compare two dynamic_prop objects for equality. dynamic_prop
|
/* Compare two dynamic_prop objects for equality. dynamic_prop
|
||||||
|
@ -1519,19 +1595,19 @@ extern unsigned type_align (struct type *);
|
||||||
extern bool set_type_align (struct type *, ULONGEST);
|
extern bool set_type_align (struct type *, ULONGEST);
|
||||||
|
|
||||||
#define TYPE_LOW_BOUND(range_type) \
|
#define TYPE_LOW_BOUND(range_type) \
|
||||||
((range_type)->bounds ()->low.data.const_val)
|
((range_type)->bounds ()->low.const_val ())
|
||||||
#define TYPE_HIGH_BOUND(range_type) \
|
#define TYPE_HIGH_BOUND(range_type) \
|
||||||
((range_type)->bounds ()->high.data.const_val)
|
((range_type)->bounds ()->high.const_val ())
|
||||||
#define TYPE_LOW_BOUND_UNDEFINED(range_type) \
|
#define TYPE_LOW_BOUND_UNDEFINED(range_type) \
|
||||||
(TYPE_LOW_BOUND_KIND(range_type) == PROP_UNDEFINED)
|
(TYPE_LOW_BOUND_KIND(range_type) == PROP_UNDEFINED)
|
||||||
#define TYPE_HIGH_BOUND_UNDEFINED(range_type) \
|
#define TYPE_HIGH_BOUND_UNDEFINED(range_type) \
|
||||||
(TYPE_HIGH_BOUND_KIND(range_type) == PROP_UNDEFINED)
|
(TYPE_HIGH_BOUND_KIND(range_type) == PROP_UNDEFINED)
|
||||||
#define TYPE_HIGH_BOUND_KIND(range_type) \
|
#define TYPE_HIGH_BOUND_KIND(range_type) \
|
||||||
((range_type)->bounds ()->high.kind)
|
((range_type)->bounds ()->high.kind ())
|
||||||
#define TYPE_LOW_BOUND_KIND(range_type) \
|
#define TYPE_LOW_BOUND_KIND(range_type) \
|
||||||
((range_type)->bounds ()->low.kind)
|
((range_type)->bounds ()->low.kind ())
|
||||||
#define TYPE_BIT_STRIDE(range_type) \
|
#define TYPE_BIT_STRIDE(range_type) \
|
||||||
((range_type)->bounds ()->stride.data.const_val \
|
((range_type)->bounds ()->stride.const_val () \
|
||||||
* ((range_type)->bounds ()->flag_is_byte_stride ? 8 : 1))
|
* ((range_type)->bounds ()->flag_is_byte_stride ? 8 : 1))
|
||||||
|
|
||||||
/* Property accessors for the type data location. */
|
/* Property accessors for the type data location. */
|
||||||
|
@ -1540,9 +1616,9 @@ extern bool set_type_align (struct type *, ULONGEST);
|
||||||
#define TYPE_DATA_LOCATION_BATON(thistype) \
|
#define TYPE_DATA_LOCATION_BATON(thistype) \
|
||||||
TYPE_DATA_LOCATION (thistype)->data.baton
|
TYPE_DATA_LOCATION (thistype)->data.baton
|
||||||
#define TYPE_DATA_LOCATION_ADDR(thistype) \
|
#define TYPE_DATA_LOCATION_ADDR(thistype) \
|
||||||
TYPE_DATA_LOCATION (thistype)->data.const_val
|
(TYPE_DATA_LOCATION (thistype)->const_val ())
|
||||||
#define TYPE_DATA_LOCATION_KIND(thistype) \
|
#define TYPE_DATA_LOCATION_KIND(thistype) \
|
||||||
TYPE_DATA_LOCATION (thistype)->kind
|
(TYPE_DATA_LOCATION (thistype)->kind ())
|
||||||
#define TYPE_DYNAMIC_LENGTH(thistype) \
|
#define TYPE_DYNAMIC_LENGTH(thistype) \
|
||||||
((thistype)->dyn_prop (DYN_PROP_BYTE_SIZE))
|
((thistype)->dyn_prop (DYN_PROP_BYTE_SIZE))
|
||||||
|
|
||||||
|
@ -1556,9 +1632,9 @@ extern bool set_type_align (struct type *, ULONGEST);
|
||||||
#define TYPE_DYN_PROP_BATON(dynprop) \
|
#define TYPE_DYN_PROP_BATON(dynprop) \
|
||||||
dynprop->data.baton
|
dynprop->data.baton
|
||||||
#define TYPE_DYN_PROP_ADDR(dynprop) \
|
#define TYPE_DYN_PROP_ADDR(dynprop) \
|
||||||
dynprop->data.const_val
|
(dynprop->const_val ())
|
||||||
#define TYPE_DYN_PROP_KIND(dynprop) \
|
#define TYPE_DYN_PROP_KIND(dynprop) \
|
||||||
dynprop->kind
|
(dynprop->kind ())
|
||||||
|
|
||||||
|
|
||||||
/* Accessors for struct range_bounds data attached to an array type's
|
/* Accessors for struct range_bounds data attached to an array type's
|
||||||
|
|
|
@ -471,8 +471,7 @@ gnuv3_baseclass_offset (struct type *type, int index,
|
||||||
baton.locexpr = *TYPE_FIELD_DWARF_BLOCK (type, index);
|
baton.locexpr = *TYPE_FIELD_DWARF_BLOCK (type, index);
|
||||||
|
|
||||||
struct dynamic_prop prop;
|
struct dynamic_prop prop;
|
||||||
prop.kind = PROP_LOCEXPR;
|
prop.set_locexpr (&baton);
|
||||||
prop.data.baton = &baton;
|
|
||||||
|
|
||||||
struct property_addr_info addr_stack;
|
struct property_addr_info addr_stack;
|
||||||
addr_stack.type = type;
|
addr_stack.type = type;
|
||||||
|
|
|
@ -1736,9 +1736,9 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
||||||
tp->set_num_fields (0);
|
tp->set_num_fields (0);
|
||||||
tp->set_bounds (((struct range_bounds *)
|
tp->set_bounds (((struct range_bounds *)
|
||||||
TYPE_ZALLOC (tp, sizeof (struct range_bounds))));
|
TYPE_ZALLOC (tp, sizeof (struct range_bounds))));
|
||||||
TYPE_LOW_BOUND (tp) = AUX_GET_DNLOW (bigend, ax);
|
tp->bounds ()->low.set_const_val (AUX_GET_DNLOW (bigend, ax));
|
||||||
ax++;
|
ax++;
|
||||||
TYPE_HIGH_BOUND (tp) = AUX_GET_DNHIGH (bigend, ax);
|
tp->bounds ()->high.set_const_val (AUX_GET_DNHIGH (bigend, ax));
|
||||||
ax++;
|
ax++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ pascal_value_print_inner (struct value *val, struct ui_file *stream,
|
||||||
maximum value. */
|
maximum value. */
|
||||||
bound_info = 0;
|
bound_info = 0;
|
||||||
high_bound = TYPE_LENGTH (type) * TARGET_CHAR_BIT - 1;
|
high_bound = TYPE_LENGTH (type) * TARGET_CHAR_BIT - 1;
|
||||||
TYPE_HIGH_BOUND (range) = high_bound;
|
range->bounds ()->high.set_const_val (high_bound);
|
||||||
}
|
}
|
||||||
maybe_bad_bstring:
|
maybe_bad_bstring:
|
||||||
if (bound_info < 0)
|
if (bound_info < 0)
|
||||||
|
|
|
@ -653,8 +653,8 @@ rust_print_struct_def (struct type *type, const char *varstring,
|
||||||
{
|
{
|
||||||
fputs_filtered ("enum ", stream);
|
fputs_filtered ("enum ", stream);
|
||||||
dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||||
if (prop != nullptr && prop->kind == PROP_TYPE)
|
if (prop != nullptr && prop->kind () == PROP_TYPE)
|
||||||
type = prop->data.original_type;
|
type = prop->original_type ();
|
||||||
}
|
}
|
||||||
else if (type->code () == TYPE_CODE_STRUCT)
|
else if (type->code () == TYPE_CODE_STRUCT)
|
||||||
fputs_filtered ("struct ", stream);
|
fputs_filtered ("struct ", stream);
|
||||||
|
|
|
@ -172,8 +172,7 @@ type_stack::follow_types (struct type *follow_type)
|
||||||
lookup_array_range_type (follow_type,
|
lookup_array_range_type (follow_type,
|
||||||
0, array_size >= 0 ? array_size - 1 : 0);
|
0, array_size >= 0 ? array_size - 1 : 0);
|
||||||
if (array_size < 0)
|
if (array_size < 0)
|
||||||
TYPE_HIGH_BOUND_KIND (follow_type->index_type ())
|
follow_type->index_type ()->bounds ()->high.set_undefined ();
|
||||||
= PROP_UNDEFINED;
|
|
||||||
break;
|
break;
|
||||||
case tp_function:
|
case tp_function:
|
||||||
/* FIXME-type-allocation: need a way to free this type when we are
|
/* FIXME-type-allocation: need a way to free this type when we are
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue