-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtype.h
66 lines (51 loc) · 2 KB
/
type.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef TYPE_H
#define TYPE_H
#include <stdio.h>
typedef union type_t type_t;
typedef struct type_base_t type_base_t;
typedef struct atomic_type_t atomic_type_t;
typedef struct type_reference_t type_reference_t;
typedef struct compound_entry_t compound_entry_t;
typedef struct compound_type_t compound_type_t;
typedef struct type_constraint_t type_constraint_t;
typedef struct type_variable_t type_variable_t;
typedef struct type_argument_t type_argument_t;
typedef struct bind_typevariables_type_t bind_typevariables_type_t;
typedef struct function_parameter_type_t function_parameter_type_t;
typedef struct function_type_t function_type_t;
typedef struct pointer_type_t pointer_type_t;
typedef struct array_type_t array_type_t;
typedef struct typeof_type_t typeof_type_t;
typedef struct iterator_type_t iterator_type_t;
extern type_t *type_void;
extern type_t *type_invalid;
void init_type_module(void);
void exit_type_module(void);
/**
* prints a human readable form of @p type to a stream
*/
void print_type(const type_t *type);
/**
* returns 1 if type contains integer numbers
*/
int is_type_int(const type_t *type);
/**
* returns 1 if type contains numbers (float or int)
*/
int is_type_numeric(const type_t *type);
/**
* returns 1 if the type is valid. A type is valid if it contains no unresolved
* references anymore and is not of TYPE_INVALID.
*/
int type_valid(const type_t *type);
/**
* returns a normalized copy of a type with type variables replaced by their
* current type. The given type (and all its hierarchy) is not modified.
*/
type_t *create_concrete_type(type_t *type);
type_t *skip_typeref(type_t *type);
int typevar_binding_stack_top(void);
void push_type_variable_bindings(type_variable_t *type_parameters,
type_argument_t *type_arguments);
void pop_type_variable_bindings(int new_top);
#endif