70 return typet(
"jsil_member_reference_type");
75 return typet(
"jsil_variable_reference_type");
88 return typet(
"jsil_user_object_type");
93 return typet(
"jsil_builtin_object_type");
98 return typet(
"jsil_null_type");
103 return typet(
"jsil_undefined_type");
108 return typet(
"jsil_kind");
113 return typet(
"jsil_empty_type");
118 if(type2.
id()==ID_union)
122 if(type1.
id()==ID_union)
128 return type1.
id()==type2.
id();
154 for(
const auto &type : types)
156 if(type.id()==ID_union)
159 elements.push_back(component);
162 elements.push_back(
componentt(ID_anonymous, type));
175 elements.resize(elements1.size()+elements2.size());
176 std::vector<union_typet::componentt>::iterator it=std::set_union(
177 elements1.begin(), elements1.end(),
178 elements2.begin(), elements2.end(),
180 elements.resize(it-elements.begin());
192 elements.resize(std::min(elements1.size(), elements2.size()));
193 std::vector<union_typet::componentt>::iterator it=std::set_intersection(
194 elements1.begin(), elements1.end(),
195 elements2.begin(), elements2.end(),
197 elements.resize(it-elements.begin());
214 if(it->type().id()==it2->type().id())
220 else if(it->type().id()<it2->type().id())
238 if(elements.size()==1)
239 return elements[0].type();
The type of an expression.
Fixed-width bit-vector with IEEE floating-point interpretation.
const union_typet & to_union_type(const typet &type)
Cast a generic typet to a union_typet.
const componentst & components() const
jsil_union_typet intersect_with(const jsil_union_typet &other) const
jsil_union_typet union_with(const jsil_union_typet &other) const
typet jsil_value_or_reference_type()
typet jsil_builtin_object_type()
const irep_idt & id() const
bool jsil_incompatible_types(const typet &type1, const typet &type2)
bool compare_components(const union_typet::componentt &comp1, const union_typet::componentt &comp2)
typet jsil_union(const typet &type1, const typet &type2)
typet jsil_reference_type()
typet jsil_undefined_type()
const typet & to_type() const
typet jsil_variable_reference_type()
bool jsil_is_subtype(const typet &type1, const typet &type2)
typet jsil_member_reference_type()
typet jsil_value_or_empty_type()
typet jsil_user_object_type()
bool is_subtype(const jsil_union_typet &other) const
jsil_union_typet & to_jsil_union_type(typet &type)