Go to the documentation of this file.
54 return typet(
"jsil_member_reference_type");
59 return typet(
"jsil_variable_reference_type");
70 return typet(
"jsil_user_object_type");
75 return typet(
"jsil_builtin_object_type");
80 return typet(
"jsil_null_type");
85 return typet(
"jsil_undefined_type");
90 return typet(
"jsil_kind");
95 return typet(
"jsil_empty_type");
100 if(type2.
id()==ID_union)
104 if(type1.
id()==ID_union)
110 return type1.
id()==type2.
id();
136 for(
const auto &type : types)
138 if(type.id()==ID_union)
144 elements.push_back(
componentt(ID_anonymous, type));
157 elements.resize(elements1.size()+elements2.size());
158 std::vector<union_typet::componentt>::iterator it=std::set_union(
159 elements1.begin(), elements1.end(),
160 elements2.begin(), elements2.end(),
162 elements.resize(it-elements.begin());
174 elements.resize(std::min(elements1.size(), elements2.size()));
175 std::vector<union_typet::componentt>::iterator it=std::set_intersection(
176 elements1.begin(), elements1.end(),
177 elements2.begin(), elements2.end(),
179 elements.resize(it-elements.begin());
196 if(it->type().id()==it2->type().id())
202 else if(it->type().id()<it2->type().id())
220 if(elements.size()==1)
221 return elements[0].type();
const componentst & components() const
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()
const union_typet & to_union_type(const typet &type)
Cast a typet to a union_typet.