IR.TypThe Smallfoot Intermediate Language: Types
type ikind = | ICharchar
| ISCharsigned char
| IUCharunsigned char
| IBoolbool
| IIntint
| IUIntunsigned int
| IShortshort
| IUShortunsigned short
| ILonglong
| IULongunsigned long
| ILongLonglong long (or _int64 on Microsoft Visual C)
| IULongLongunsigned long long (or unsigned _int64 on Microsoft Visual C)
| I128__int128_t
| IU128__uint128_t
Kinds of integers
val hash_fold_ikind :
Ppx_hash_lib.Std.Hash.state ->
ikind ->
Ppx_hash_lib.Std.Hash.stateval hash_ikind : ikind -> Ppx_hash_lib.Std.Hash.hash_valueval ikind_is_char : ikind -> boolCheck whether the integer kind is a char
val ikind_is_unsigned : ikind -> boolCheck whether the integer kind is unsigned
Kinds of floating-point numbers
type ptr_kind = | Pk_pointerC/C++, Java, Objc standard/__strong pointer
*)| Pk_lvalue_referenceC++ lvalue reference
*)| Pk_rvalue_referenceC++ rvalue reference
*)| Pk_objc_weakObj-C __weak pointer
*)| Pk_objc_unsafe_unretainedObj-C __unsafe_unretained pointer
*)| Pk_objc_autoreleasingObj-C __autoreleasing pointer
*)| Pk_objc_nullable_blockObj-C block annotated with nullable
*)| Pk_objc_nonnull_blockObj-C block annotated with nonnull
*)kind of pointer
val compare_type_quals : type_quals -> type_quals -> intval equal_type_quals : type_quals -> type_quals -> boolval mk_type_quals :
?default:type_quals ->
?is_const:bool ->
?is_reference:bool ->
?is_restrict:bool ->
?is_volatile:bool ->
unit ->
type_qualsval is_const : type_quals -> boolval is_restrict : type_quals -> boolval is_volatile : type_quals -> booltypes for sil (structured) expressions
and desc = | Tint of ikindinteger type
*)| Tfloat of fkindfloat type
*)| Tvoidvoid type
*)| Tfun of function_prototype optionfunction type
*)| Tptr of t * ptr_kindpointer type
*)| Tstruct of namestructured value type name
*)| TVar of stringtype variable (ie. C++ template variables)
*)| Tarray of {}array type with statically fixed length and stride
*)and c_function_sig = {c_name : QualifiedCppName.t;c_mangled : string option;c_template_args : template_spec_info;}and name = | CStruct of QualifiedCppName.t| CUnion of QualifiedCppName.t| CppClass of {name : QualifiedCppName.t;template_spec_info : template_spec_info;is_union : bool;}| CSharpClass of CSharpClassName.t| ErlangType of ErlangTypeName.t| HackClass of HackClassName.t| JavaClass of JavaClassName.t| ObjcClass of QualifiedCppName.t| ObjcProtocol of QualifiedCppName.t| PythonClass of PythonClassName.t| ObjcBlock of objc_block_sig| CFunction of c_function_sigand template_spec_info = | NoTemplate| Template of {mangled : string option;WARNING: because of type substitutions performed by sub_type and sub_tname, mangling is not guaranteed to be unique to a single type. All the information in the template arguments is also needed for uniqueness.
args : template_arg list;}val compare_function_prototype :
function_prototype ->
function_prototype ->
intval compare_objc_block_sig : objc_block_sig -> objc_block_sig -> intval compare_c_function_sig : c_function_sig -> c_function_sig -> intval compare_template_arg : template_arg -> template_arg -> intval compare_template_spec_info :
template_spec_info ->
template_spec_info ->
intval equal_function_prototype : function_prototype -> function_prototype -> boolval equal_objc_block_sig : objc_block_sig -> objc_block_sig -> boolval equal_c_function_sig : c_function_sig -> c_function_sig -> boolval equal_template_arg : template_arg -> template_arg -> boolval equal_template_spec_info : template_spec_info -> template_spec_info -> boolval yojson_of_t : t -> Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_function_prototype :
function_prototype ->
Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_desc : desc -> Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_objc_block_sig :
objc_block_sig ->
Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_c_function_sig :
c_function_sig ->
Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_name : name -> Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_template_arg : template_arg -> Ppx_yojson_conv_lib.Yojson.Safe.tval yojson_of_template_spec_info :
template_spec_info ->
Ppx_yojson_conv_lib.Yojson.Safe.tval hash_normalize_function_prototype :
function_prototype ->
function_prototypeval hash_normalize_function_prototype_opt :
function_prototype option ->
function_prototype optionval hash_normalize_function_prototype_list :
function_prototype list ->
function_prototype listval hash_normalize_objc_block_sig : objc_block_sig -> objc_block_sigval hash_normalize_objc_block_sig_opt :
objc_block_sig option ->
objc_block_sig optionval hash_normalize_objc_block_sig_list :
objc_block_sig list ->
objc_block_sig listval hash_normalize_c_function_sig : c_function_sig -> c_function_sigval hash_normalize_c_function_sig_opt :
c_function_sig option ->
c_function_sig optionval hash_normalize_c_function_sig_list :
c_function_sig list ->
c_function_sig listval hash_normalize_template_arg : template_arg -> template_argval hash_normalize_template_arg_opt :
template_arg option ->
template_arg optionval hash_normalize_template_arg_list : template_arg list -> template_arg listval hash_normalize_template_spec_info :
template_spec_info ->
template_spec_infoval hash_normalize_template_spec_info_opt :
template_spec_info option ->
template_spec_info optionval hash_normalize_template_spec_info_list :
template_spec_info list ->
template_spec_info listval hash_fold_t :
Ppx_hash_lib.Std.Hash.state ->
t ->
Ppx_hash_lib.Std.Hash.stateval hash : t -> Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_function_prototype :
Ppx_hash_lib.Std.Hash.state ->
function_prototype ->
Ppx_hash_lib.Std.Hash.stateval hash_function_prototype :
function_prototype ->
Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_desc :
Ppx_hash_lib.Std.Hash.state ->
desc ->
Ppx_hash_lib.Std.Hash.stateval hash_desc : desc -> Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_objc_block_sig :
Ppx_hash_lib.Std.Hash.state ->
objc_block_sig ->
Ppx_hash_lib.Std.Hash.stateval hash_objc_block_sig : objc_block_sig -> Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_c_function_sig :
Ppx_hash_lib.Std.Hash.state ->
c_function_sig ->
Ppx_hash_lib.Std.Hash.stateval hash_c_function_sig : c_function_sig -> Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_name :
Ppx_hash_lib.Std.Hash.state ->
name ->
Ppx_hash_lib.Std.Hash.stateval hash_name : name -> Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_template_arg :
Ppx_hash_lib.Std.Hash.state ->
template_arg ->
Ppx_hash_lib.Std.Hash.stateval hash_template_arg : template_arg -> Ppx_hash_lib.Std.Hash.hash_valueval hash_fold_template_spec_info :
Ppx_hash_lib.Std.Hash.state ->
template_spec_info ->
Ppx_hash_lib.Std.Hash.stateval hash_template_spec_info :
template_spec_info ->
Ppx_hash_lib.Std.Hash.hash_valueval sexp_of_t : t -> Sexplib0.Sexp.tval sexp_of_function_prototype : function_prototype -> Sexplib0.Sexp.tval sexp_of_desc : desc -> Sexplib0.Sexp.tval sexp_of_objc_block_sig : objc_block_sig -> Sexplib0.Sexp.tval sexp_of_c_function_sig : c_function_sig -> Sexplib0.Sexp.tval sexp_of_name : name -> Sexplib0.Sexp.tval sexp_of_template_arg : template_arg -> Sexplib0.Sexp.tval sexp_of_template_spec_info : template_spec_info -> Sexplib0.Sexp.tval t_of_sexp : Sexplib0.Sexp.t -> tval function_prototype_of_sexp : Sexplib0.Sexp.t -> function_prototypeval desc_of_sexp : Sexplib0.Sexp.t -> descval objc_block_sig_of_sexp : Sexplib0.Sexp.t -> objc_block_sigval c_function_sig_of_sexp : Sexplib0.Sexp.t -> c_function_sigval name_of_sexp : Sexplib0.Sexp.t -> nameval template_arg_of_sexp : Sexplib0.Sexp.t -> template_argval template_spec_info_of_sexp : Sexplib0.Sexp.t -> template_spec_infoval pp_template_spec_info :
IStdlib.Pp.env ->
F.formatter ->
template_spec_info ->
unitval is_template_spec_info_empty : template_spec_info -> boolval mk : ?default:t -> ?quals:type_quals -> desc -> tCreate Typ.t from given desc. if default is passed then use its value to set other fields such as quals
Create an array type from a given element type. If length or stride value is given, use them as static length and size.
val size_t : ikindikind of size_t
val is_weak_pointer : t -> boolval is_block_nonnull_pointer : t -> boolval is_strong_pointer : t -> boolmodule Name : sig ... endoverloading_resolution is a list of predicates that compare whether a type T1 binds a type T2.
val pp_full : IStdlib.Pp.env -> F.formatter -> t -> unitPretty print a type with all the details.
val pp : IStdlib.Pp.env -> F.formatter -> t -> unitPretty print a type.
val pp_desc : IStdlib.Pp.env -> F.formatter -> desc -> unitPretty print a type desc.
val pp_java : verbose:bool -> F.formatter -> t -> unitPretty print a Java type. Raises if type isn't produced by the Java frontend
val pp_cs : verbose:bool -> F.formatter -> t -> unitPretty print a Java type. Raises if type isn't produced by the CSharp frontend
val to_string : t -> stringval desc_to_string : desc -> stringval is_ptr_to_const : t -> boolcheck if typ is a pointer type to const
val is_objc_class : t -> boolval is_cpp_class : t -> boolval is_pointer_to_cpp_class : t -> boolval is_pointer_to_smart_pointer : t -> boolval is_unique_pointer : t -> boolval is_pointer_to_unique_pointer : t -> boolval is_folly_coro : t -> boolval is_thrift_field_ref : t -> boolval is_pointer_to_void : t -> boolval is_void : t -> boolval is_pointer_to_int : t -> boolval is_pointer_to_const : t -> boolval is_pointer_to_function : t -> boolval is_pointer : t -> boolval is_reference : t -> boolval is_rvalue_reference : t -> boolval is_const_reference_on_source : t -> boolval is_struct : t -> boolval is_int : t -> boolval is_unsigned_int : t -> boolval is_char : t -> boolval is_csharp_type : t -> boolis t a type produced by the Java frontend?
val is_java_type : t -> boolis t a type produced by the Java frontend?