Go to the documentation of this file.
56 return typet(
"jsil_member_reference_type");
61 return typet(
"jsil_variable_reference_type");
72 return typet(
"jsil_user_object_type");
77 return typet(
"jsil_builtin_object_type");
82 return typet(
"jsil_null_type");
87 return typet(
"jsil_undefined_type");
92 return typet(
"jsil_kind");
97 return typet(
"jsil_empty_type");
102 if(type2.
id()==ID_union)
106 if(type1.
id()==ID_union)
112 return type1.
id()==type2.
id();
138 for(
const auto &type : types)
140 if(type.id()==ID_union)
146 elements.push_back(
componentt(ID_anonymous, type));
159 elements.resize(elements1.size()+elements2.size());
160 std::vector<union_typet::componentt>::iterator it=std::set_union(
161 elements1.begin(), elements1.end(),
162 elements2.begin(), elements2.end(),
164 elements.resize(it-elements.begin());
176 elements.resize(std::min(elements1.size(), elements2.size()));
177 std::vector<union_typet::componentt>::iterator it=std::set_intersection(
178 elements1.begin(), elements1.end(),
179 elements2.begin(), elements2.end(),
181 elements.resize(it-elements.begin());
198 if(it->type().id()==it2->type().id())
204 else if(it->type().id()<it2->type().id())
222 if(elements.size()==1)
223 return elements[0].type();
const componentst & components() const
const union_typet & to_union_type(const typet &type)
Cast a typet to a union_typet.
The type of an expression, extends irept.
jsil_union_typet intersect_with(const jsil_union_typet &other) const
Fixed-width bit-vector with IEEE floating-point interpretation.
auto component(T &struct_expr, const irep_idt &name, const namespacet &ns) -> decltype(struct_expr.op0())
const typet & to_type() const
typet jsil_builtin_object_type()
bool jsil_incompatible_types(const typet &type1, const typet &type2)
typet jsil_value_or_reference_type()
bool compare_components(const union_typet::componentt &comp1, const union_typet::componentt &comp2)
typet & type()
Return the type of the expression.
typet jsil_reference_type()
typet jsil_union(const typet &type1, const typet &type2)
typet jsil_variable_reference_type()
typet jsil_undefined_type()
const irep_idt & id() const
bool is_subtype(const jsil_union_typet &other) const
typet jsil_member_reference_type()
jsil_union_typet & to_jsil_union_type(typet &type)
jsil_union_typet union_with(const jsil_union_typet &other) const
bool jsil_is_subtype(const typet &type1, const typet &type2)
typet jsil_user_object_type()
typet jsil_value_or_empty_type()