+ return "flds_bnds.bounds = {%s, %s}" % (low, high)
+ def type_specific_img(self):
+ """Return a string image of the main_type type_specific union.
+ Only the relevant component of that union is printed (based on
+ the value of the type_specific_kind field.
+ """
+ type_specific_kind = str(self.val['type_specific_field'])
+ type_specific = self.val['type_specific']
+ if type_specific_kind == "TYPE_SPECIFIC_NONE":
+ img = 'type_specific_field = %s' % type_specific_kind
+ elif type_specific_kind == "TYPE_SPECIFIC_CPLUS_STUFF":
+ img = "cplus_stuff = %s" % type_specific['cplus_stuff']
+ elif type_specific_kind == "TYPE_SPECIFIC_GNAT_STUFF":
+ img = ("gnat_stuff = {descriptive_type = %s}"
+ % type_specific['gnat_stuff']['descriptive_type'])
+ elif type_specific_kind == "TYPE_SPECIFIC_FLOATFORMAT":
+ img = "floatformat[0..1] = %s" % type_specific['floatformat']
+ elif type_specific_kind == "TYPE_SPECIFIC_FUNC":
+ img = ("calling_convention = %d"
+ % type_specific['func_stuff']['calling_convention'])
+ # tail_call_list is not printed.
+ else:
+ img = ("type_specific = ??? (unknown type_secific_kind: %s)"
+ % type_specific_kind)
+ return img
+